Skip to content

Instantly share code, notes, and snippets.

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@technobly
technobly / SparkPWM.cpp
Created January 8, 2014 08:13
SPARK CORE CUSTOM PWM FREQUENCY EXAMPLE Define your own frequency! PWM Glitch issue fixed!!
//-----------------------------------------------
// SPARK CORE CUSTOM PWM FREQUENCY EXAMPLE
//===============================================
// Define your own frequency below!
// PWM Glitch issue fixed, only sets up PWM once,
// ... thereafter sets duty cycle.
// This allows true 0 - 100% PWM.
// Copy this into a new application at:
// https://www.spark.io/build and go nuts!
//-----------------------------------------------
@gourneau
gourneau / zpl-tcp.py
Created September 11, 2014 17:23
Python ZPL over TCP/IP Example
#!/usr/bin/env python
#ZPL docs can be found at https://support.zebra.com/cpws/docs/zpl/zpl_manual.pdf
#This works with Python 3, change the bytes to str if you are using Python 2
import socket
#One easy way to find the IP address is with this nmap command
# nmap 192.168.0.* -p T:9100 --open