Yosemite Beta LaunchPad Error fixed
요세미티 Beta1 설치때 다운로드 안되시는 분들은 일본 vpn으로 변경 후 해결한 엔드유저분들이 많다. 그런데 문제는 이후 다운로드 받으면서 문제가 된 LaunchPad에 있는 요세미티 아이콘이 삭제가 안되는 문제가 있다.
열심히 구글링과 각종 커뮤니티를 섭렵한 끝에 아주 간단히 Fix 할수 있었다. 그 해결책은 다음과 같다.
요세미티 Beta1 설치때 다운로드 안되시는 분들은 일본 vpn으로 변경 후 해결한 엔드유저분들이 많다. 그런데 문제는 이후 다운로드 받으면서 문제가 된 LaunchPad에 있는 요세미티 아이콘이 삭제가 안되는 문제가 있다.
열심히 구글링과 각종 커뮤니티를 섭렵한 끝에 아주 간단히 Fix 할수 있었다. 그 해결책은 다음과 같다.
sudo nano /etc/modprobe.d/8192cu.conf
# Disable power management
options 8192cu rtw_power_mgnt=0
bootstrap css navbar 중앙정렬 하기.
.navbar .nav,
.navbar .nav > li {
float:none;
display:inline-block;
*display:inline; /* ie7 fix */
*zoom:1; /* hasLayout ie7 trigger */
vertical-align: top;
}
.navbar-inner {
text-align:center;
}
중앙정렬 안먹을때 유용함.
/etc/init.d/rc.local :
makes it to start as a level "service" whereas,/etc/rc.local
would simply launch that script at boot time.
angular.copy and angular.extend 차이점.
Everything in /etc/rc.local runs as the root user.
Also, you can group commands together using ().
The following should work in /etc/rc.local
(sleep 10;python scriptname.py)&
The best way to execute this code is using a callback function. This is a function that is attached to a specific GPIO pin and run whenever that edge is detected. Let’s try one:
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
GPIO.setup(24, GPIO.IN, pull_up_down = GPIO.PUD_UP)
def printFunction(channel):
print(“Button 1 pressed!”)
print(“Note how the bouncetime affects the button press”)
GPIO.add_event_detect(23, GPIO.RISING, callback=printFunction, bouncetime=300)
while True:
GPIO.wait_for_edge(24, GPIO.FALLING)
print(“Button 2 Pressed”)
GPIO.wait_for_edge(24, GPIO.RISING)
print(“Button 2 Released”)
GPIO.cleanup()
sudo sh -c "echo 252 > /sys/class/gpio/export" ls -l /sys/class/gpio
Then turn the display back on with
sudo sh -c "echo '1' > /sys/class/gpio/gpio252/value"
sudo sh -c "echo '0' > /sys/class/gpio/gpio252/value"