Skip to content

Instantly share code, notes, and snippets.

@jmervine
jmervine / unix-links.md
Last active August 29, 2015 14:25
Compilation of {U,Li}nix Links
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
const char* ssid = "..............";
const char* password = "................";
String form = "<form action='led'><input type='radio' name='state' value='1' checked>On<input type='radio' name='state' value='0'>Off<input type='submit' value='Submit'></form>";
String imagepage = "<img src='/led.png'>";
@jimweirich
jimweirich / Rakefile
Last active December 11, 2015 05:18
I wanted to share this, but it's not quite ready to be a project yet. This is a Rake library to build Digispark applications. Currently this only supports DigiSpark arduinos, but when I find my Arduino starter kit, I want to make it work for that as well. Patches and suggestions are welcome.
# Sample Rakefile for the Digispark/Arduino build script
require './arduino'
# Create an arduino builder
Avr = Rake::Arduino.new do |cfg|
# There are lots of configuration options, but I don't know
# yet what ones will survive. At the very least you must
# specify the location of the of the Arduino IDE application
# that comes with the special DigiSpark support.
@eoinmcg
eoinmcg / min.py
Created August 23, 2012 12:14
Handy utility for @js13kGames, zip your files and keep track of file size
#!/usr/bin/python
# Simple python script that takes a html file extracts all scripts and concatenates them into
# a single file. The concatenated script is then sent to the google closure compiler for further
# squishing.
# Finally a game.zip archive is created with all specified files. The size of this archive
# is printed to standard output
#
# Usage:
# In the terminal type:
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 5, 2024 13:30
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@sfate
sfate / vim-on-heroku.sh
Created June 7, 2012 14:39 — forked from naaman/vim-on-heroku.sh
vim on heroku
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@mrnugget
mrnugget / INSTRUCTIONS.md
Created March 25, 2012 13:21
Make MacVim use the correct $PATH with rbenv
@caged
caged / stale.rb
Created January 4, 2011 20:11
Quick script to help you find and deal with old watched repos, forks and owned repos.
#!/usr/bin/env ruby
#
# Quick hack to help you find and deal with old watched repos, forks and owned repos.
#
# It will ask you to confirm once if you want to unwatch a repo.
#
# You can't unwatch your own repos, so they will need to be deleted.
# THIS SCRIPT WILL ASK YOU FOR CONFIRMATION TWICE BEFORE IT DELETES A REPO.
#
require 'rubygems'
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
function! s:align()
let p = '^\s*|\s.*\s|\s*$'
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
Tabularize/|/l1
normal! 0
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))