Yosemite Beta LaunchPad Error fixed

요세미티 Beta1 설치때 다운로드 안되시는 분들은 일본 vpn으로 변경 후 해결한 엔드유저분들이 많다. 그런데 문제는 이후 다운로드 받으면서 문제가 된 LaunchPad에 있는 요세미티 아이콘이 삭제가 안되는 문제가 있다.

열심히 구글링과 각종 커뮤니티를 섭렵한 끝에 아주 간단히 Fix 할수 있었다. 그 해결책은 다음과 같다.

bootstrap navbar center

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;
}

중앙정렬 안먹을때 유용함.

Get a BananaPi,RaspberryPi

# 좌: 라즈베리파이 , 우: 바나나파이 !!

- 앞으로 재미난 프로젝트 할 거리가 많아졌다.

AutoStart Script Best-Simple Tips

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)&

Raspberry Pi GPIO Pins Tutorial

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()

Turn the display back on/off on Raspberry Pi

Start by getting access to the GPIO by making a device link
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"

or back off
sudo sh -c  "echo '0' > /sys/class/gpio/gpio252/value"