Skip to content

Instantly share code, notes, and snippets.

Nathan nathantsoi

View GitHub Profile
View gist:cd607a94e67b121011812871eb19f335
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum.
Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies
@nathantsoi
nathantsoi / msg.proto
Last active Apr 24, 2017
nano pb example
View msg.proto
syntax = "proto2";
import "msg_osd.proto";
message Message {
enum Type {
Api = 1;
Osd = 2;
}
required uint32 utime = 1;
@nathantsoi
nathantsoi / stm32f429-disco.cfg
Created Apr 19, 2016
openocd config file for stm32f429-disco board
View stm32f429-disco.cfg
# openocd -f stm32f429-disco.cfg -c "program FILE_NAME.elf verify reset exit"
# for: http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF259090
interface hla
hla_layout stlink
hla_device_desc "ST-LINK/V2"
# stm32f429 discovery 0483:374b
hla_vid_pid 0x0483 0x374b
View nexus-5.0.1-ota-update.sh
#!/bin/bash
# make a new directory to work in
cd ~/Desktop && mkdir nexus501
# get the OTA
wget http://android.clients.google.com/packages/ota/google_hammerhead/785a2f7af3718dba7e569decde8b6c4dc476a309.signed-hammerhead-LRX22C-from-LRX21O.785a2f7a.zip
mv *.zip update.zip
# get the flashable super su
View install-cloud-init.sh
# We need the latest epel-release for a RHEL/Centos specific cloud-init
curl -O http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# After this finishes you can build an AMI that will process the user data
# with cloud-init. You may also be interested in taking a look at the config
# file at /etc/cloud/cloud.cfg
yum install -y cloud-init
# edits /etc/cloud/cloud.cfg
@nathantsoi
nathantsoi / rbenvosx10.7.sh
Created Apr 12, 2012
install rbenv and fast boot ruby
View rbenvosx10.7.sh
#!/bin/bash
# Nathan Tsoi 2012
# mad props:
# https://github.com/sstephenson/rbenv
# https://github.com/sstephenson/ruby-build
# https://github.com/mxcl/homebrew/wiki/installation
# https://raw.github.com/gist/1688857
#remove rvm
rvm &>/dev/null
You can’t perform that action at this time.