Skip to content

Instantly share code, notes, and snippets.

View firmread's full-sized avatar

Reed Tothong firmread

View GitHub Profile
@firmread
firmread / pi-essentials.sh
Last active August 29, 2015 14:17
basic tools
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install netatalk
# already netatalk's dependency but if no netatalk, totally do this
# sudo apt-get install avahi-daemon
# so we can find raspberrypi.local
@firmread
firmread / pi-z.sh
Last active August 29, 2015 14:17
git clone https://github.com/rupa/z.git ~/.z-src
echo "# z is a new j" >> ~/.bashrc
echo "# regex 'frecent' use folder" >> ~/.bashrc
echo ". ~/.z-src/z.sh" >> ~/.bashrc
@firmread
firmread / pi-btsync.sh
Last active August 29, 2015 14:17
get btsync on pi
###
# setup btsync in pi
###
mkdir ~/.btsync && cd ~/.btsync
#wget http://btsync.s3-website-us-east-1.amazonaws.com/btsync_arm.tar.gz
wget https://download-cdn.getsyncapp.com/stable/linux-arm/BitTorrent-Sync_arm.tar.gz
tar -xvf BitTorrent-Sync_arm.tar.gz
echo "# run btsync and web interfact at port 8888" >> ~/.bashrc
@firmread
firmread / pi-vim.sh
Last active August 29, 2015 14:17
vim on the pi << attempted to get YCM but can't find compatible Clang on the Pi...
### VERSION WITH TRIMMED YCM STUFFS
###
# install vim!
###
# sudo apt-get install vim
# but it not always the latest version!
# let's follow http://www.vim.org/mercurial.php
# get some tools
# add this to your vimrc
#let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf_openframeworks.py"
# Partially stolen from https://bitbucket.org/mblum/libgp/src/2537ea7329ef/.ycm_extra_conf.py
import os
import ycm_core
# These are the compilation flags that will be used in case there's no
# compilation database set (by default, one is not set).
@firmread
firmread / README.md
Last active August 29, 2015 14:15 — forked from rvagg/README.md

Work in progress, I'll write this up properly when I'm done.

Almost all credit goes to @maxogden for putting me on to this and pointing me in the right direction for each of these items.

Prerequisites:

  • Raspberry Pi
  • Kindle Paperwhite freed from its locked down state (jailbroken) http://www.mobileread.com/forums/showthread.php?t=198446
    • You have to downgrade your Kindle to 5.3.1 to install the current jailbreak; that's just a matter of getting the old version image, putting it on your Kindle via USB and telling it to install "upgrade". Then you put in the Jailbreak files, load the ebook and break.
  • Your kindle will be quick to detect an upgrade is available so it'll want to upgrade soon afterwards but the jailbreak will last but you have to reinstall the developer certificates so it's a bit of a pain but doable. Find all the instructions on the mobileread.com forums and wiki.

Flush img

download img

http://www.raspberrypi.org/downloads

插入SD卡,用df命令查看当前已挂载的卷

$ df -h
@firmread
firmread / brew-git-osx.md
Last active August 29, 2015 14:15 — forked from digitaljhelms/gist:2931522
homebrew git on os x

Building and installing Git from source on OS X Lion

This outline for building and installing Git has only been tested against Mac OS X 10.7.x (Lion). While these steps may work for previous versions of Mac OS X, I cannot confirm this. Furthermore, you're on your own, if you screw something up, it's not my fault.

If you have Xcode 4, you have Git!

Xcode 4 includes the Git binary at the application level so it's available to itself (located at /Applications/Xcode.app/Contents/Developer/usr/bin/git). Additionally, Xcode 4 includes a new "Downloads" preference pane to install optional components, one of which are the Command Line Tools (similar to the Dev Tools package that shipped with older versions of Xcode) and once installed, Git (and many other utilities, such as make) is installed at the system level (located at /usr/bin).

*Note: You don't have to install Xcode to use the Command Line Tools; it can be downloaded independently from the Apple Developer site (you need to login, but it's free

// from https://github.com/mikewesthad/ExperimentalMedia/blob/master/people/mikewesthad/Week4/Arduino/MorseAdvanced/MorseAdvanced.ino
// Explanation of International Morse Code from: http://en.wikipedia.org/wiki/Morse_code
// Dot is basic unit of time
// Dash is three dits
// Space between dots and dashes within characters is one dot
// Space between letters is 3 dots
// Space between words is 7 dots
s valid, RSSI: 83, mode: WPA2
yyn yyn
yyn Brain Wrinkle
yyn Atsuyo et Akiko
yyn Drum Bunny
yyn 09FX02043875