Skip to content

Instantly share code, notes, and snippets.

View yyolk's full-sized avatar
🍯
𝙧𝙚𝙘𝙪𝙧𝙨𝙞𝙫𝙚 𝙩𝙖𝙪𝙩𝙤𝙡𝙤𝙜𝙮

Joseph Chiocchi yyolk

🍯
𝙧𝙚𝙘𝙪𝙧𝙨𝙞𝙫𝙚 𝙩𝙖𝙪𝙩𝙤𝙡𝙤𝙜𝙮
View GitHub Profile
@yyolk
yyolk / summarize.rb
Created September 7, 2011 07:29 — forked from mat813/summarize.rb
Jekyll filter for summary text between two <!-- CUT --> tags
module Jekyll
module Filters
def summarize(str, splitstr = /\s*<div id="extended">/)
str.split(splitstr)[0]
end
end
end
@yyolk
yyolk / README.md
Created June 8, 2012 10:03 — forked from vanto/README.md
OEmbed Liquid Tag for Jekyll

OEmbed Liquid Tag for Jekyll

This is a simple liquid tag that helps to easily embed images, videos or slides from OEmbed enabled providers. It uses Magnus Holm's great oembed gem which connects to the OEmbed endpoint of the link's provider and retrieves the HTML code to embed the content properly (i.e. an in-place YouTube player, Image tag for Flickr, in-place slideshare viewer etc.). By default it supports the following OEmbed providers (but can fallback to Embed.ly or OoEmbed for other providers):

  • Youtube
  • Flickr
  • Viddler
  • Qik
  • Revision3
  • Hulu
  • Vimeo
@yyolk
yyolk / rubycocoa.rb
Created August 4, 2012 16:19
RubyCocoa homebrew formula
require 'formula'
class Rubycocoa <Formula
url 'http://downloads.sourceforge.net/project/rubycocoa/RubyCocoa/1.0.2/RubyCocoa-1.0.2.tar.gz'
homepage 'http://rubycocoa.sourceforge.net/'
md5 'eb6127054b808c2700c6253c8a4793c3'
def keg_only?
:provided_by_osx
end
@yyolk
yyolk / .bashrc
Created April 8, 2013 03:51 — forked from henrik/.bashrc
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 mkpdir="mkdir `date +%Y%m%d-%H%M`"
alias egrep='egrep --color=auto'
// 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 / ws2801BASE.ino
Last active December 20, 2015 07:29 — forked from greymechanic/ws2801BASE
#include "SPI.h"
#include "Adafruit_WS2801.h"
Adafruit_WS2801 strip = Adafruit_WS2801(32);
void setup() {
Serial.begin(115200);
strip.begin();
strip.show();
}
@yyolk
yyolk / hornet.js
Last active December 20, 2015 07:49 — forked from greymechanic/hornetController.js
hornet
loadedInterfaceName = "template";
interfaceOrientation = "portrait";
pages = [[
{
"name": "refresh",
"type": "Button",
"bounds": [.6, .9, .2, .1],
"startingValue": 0,
@yyolk
yyolk / pushover.rb
Last active December 21, 2015 15:19 — forked from milligramme/pushover.rb
default to use ARGV[1..-1] (everything after calling the script)
#!/usr/bin/env ruby
require "net/https"
url = URI.parse("https://api.pushover.net/1/messages")
req = Net::HTTP::Post.new(url.path)
req.set_form_data({
:token => "abc123",
:user => "user123",
:message => "#{ARGV[1..-1].join(" ")}",
})
@yyolk
yyolk / sendxbmc.sh
Last active December 25, 2015 11:29 — forked from dataolle/sendxbmc.sh
#!/bin/bash
#set url and port to the xbmc box webservice
XBMC_HOST="http://openelec:80"
if [ "$1" = "" ]; then
echo -n "Insert URL: "
read url
else
url="$1"
fi
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="wireless.artic.edu"
proto=RSN
key_mgmt=WPA-EAP
pairwise=CCMP
auth_alg=OPEN
eap=TTLS