Skip to content

Instantly share code, notes, and snippets.

View yyolk's full-sized avatar
๐Ÿฏ
๐™ง๐™š๐™˜๐™ช๐™ง๐™จ๐™ž๐™ซ๐™š ๐™ฉ๐™–๐™ช๐™ฉ๐™ค๐™ก๐™ค๐™œ๐™ฎ

Joseph Chiocchi yyolk

๐Ÿฏ
๐™ง๐™š๐™˜๐™ช๐™ง๐™จ๐™ž๐™ซ๐™š ๐™ฉ๐™–๐™ช๐™ฉ๐™ค๐™ก๐™ค๐™œ๐™ฎ
View GitHub Profile
#grab yolkalyzer
curl -O "https://raw.github.com/yyolk/yolkalyzer/master/yolkalyzer.rb"
#store our directory name in a var
export dirdir="$HOME/Desktop/fukd_dae-`date +'%Y%M%d-%H%m%s'`"
# create dir for our fukd .dae
mkdir "$dirdir"
# iterate over dropped objects with yolkalyzer.rb we grabbed with curl
for f in "$@"
do
@yyolk
yyolk / jquery.mustache.js
Last active December 16, 2015 05:49
jquery.mustache.js ripped from couchapp/vendor/
/*
Shameless port of a shameless port
@defunkt => @janl => @aq
See http://github.com/defunkt/mustache for more info.
*/
;(function($) {
/*
@yyolk
yyolk / md5.js
Created April 15, 2013 10:31
md5.js ripped from couchapp/vendor/
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
/*
@yyolk
yyolk / crontab
Created April 26, 2013 04:07
crontab 20130425
# * * * * * command to be executed
# - - - - -
# | | | | |
# | | | | +- - - - day of week (0 - 6) (Sunday=0)
# | | | +- - - - - month (1 - 12)
# | | +- - - - - - day of month (1 - 31)
# | +- - - - - - - hour (0 - 23)
# +- - - - - - - - minute (0 - 59)
0 0 * * * mv ~/Dropbox/Apps/Drafts/running.md ~/Dropbox/Apps/Drafts/$(date +%Y%m%d).md > /dev/null 2>&1
@yyolk
yyolk / pushalert.sh
Last active December 16, 2015 16:40
usage: `./pushalert.sh` will ping devices, `./pushalert.sh $(date)` will push (evaluated) text
#!/bin/bash
#use all arguments after self as the message, or default to a standard ping
if [[ -z "$1" ]]; then
MESSAGE="Ping!"
else
MESSAGE="$@"
fi
alias chrome="open -a 'Google Chrome'"
alias nose="node server*"
alias noce="node server & chrome 'http://localhost:3000'"
alias ni="npm install"
alias cit="python $HOME/code/python/cit/cit.py"
alias byword='open -a Byword'
alias l="ls -G"
alias ls="ls -G"
alias mkpdir="mkdir `date +%Y%m%d-%H%M`"
/path/to/qemu-system-arm -kernel kernel.img -cpu arm1176 -m 512 -M raspi -serial stdio -append "rw dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1024 bcm2708_fb.fbheight=768 bcm2708.boardrev=0xf bcm2708.serial=0xcad0eedf smsc95xx.macaddr=B8:27:EB:D0:EE:DF sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0x1c000000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait" -snapshot -sd 2012-10-28-wheezy-raspbian.img -d guest_errors
@yyolk
yyolk / bfgminer.rb
Last active December 17, 2015 16:39
bash script to start mining bitcoins with cgminer on osx
require 'formula'
class Bfgminer < Formula
homepage 'https://github.com/luke-jr/bfgminer'
url 'http://luke.dashjr.org/programs/bitcoin/files/bfgminer/3.0.2/bfgminer-3.0.2.zip'
sha1 '43e01b571407d4a92dfdf9ca8b215fe3a1cc3fde'
depends_on 'autoconf' => :build
depends_on 'automake' => :build
depends_on 'libtool' => :build
// Receive multiple numeric fields using Arduino 1.0 Stream parsing
#include "SPI.h"
#include "Adafruit_WS2801.h"
Adafruit_WS2801 strip = Adafruit_WS2801(64);
const int NUMBER_OF_FIELDS = 192; // how many comma-separated fields we expect
@yyolk
yyolk / primary_demo.ino
Created June 23, 2013 00:46
primary demo
#include "SPI.h"
#include "Adafruit_WS2801.h"
int dataPin = 11; // Yellow wire on Adafruit Pixels
int clockPin = 13; // Green wire on Adafruit Pixels
int prgb[3];
int rgb[3];
Adafruit_WS2801 strip = Adafruit_WS2801(109, dataPin, clockPin);
void setup(){