This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use POE qw< Component::Server::TCP Component::IRC >; | |
# irc config | |
my @channels = ("#test"); | |
my $irc_nick = 'blop'; | |
my $irc_name = 'blop the bot'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple bluetooth scan with IOBluetooth (macruby) | |
framework 'appkit' | |
framework 'IOBluetooth' | |
# IOBluetoothInquiryDelegate | |
class EventHandler | |
def deviceInquiryStarted(sender) | |
puts "Searching for devices..." | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# A very straightforward (and ugly :p) translation of mustache.js to | |
# coffee-script. 'should get faster by using CS's list comprehensions | |
# too! -- oz | |
# | |
# Generate mustache.js with: with coffee -c mustache.coffee | |
# Then clone janl's mustache.js, and run "rake spec" against the | |
# generated version. | |
# Current window object in DOM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# General config: | |
# --------------- | |
setw -g utf8 on | |
set -g lock-after-time 1800 | |
set-window-option -g automatic-rename off | |
set -g default-terminal screen | |
# Look & feel: | |
# ------------ | |
# Panes colors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Bookmark page with Pinboard.in | |
com -nargs=0 pin execute "open " + function(doc) { if(doc.getSelection){s=doc.getSelection();}else{s='';}; return 'https://pinboard.in/add?next=same&url='+encodeURIComponent(doc.location.href)+'&description='+encodeURIComponent(s)+'&title='+encodeURIComponent(doc.title) }(content.document) | |
" Read page later with Instapaper.com | |
com -nargs=0 readlater javascript (function(d){var z=d.createElement('scr'+'ipt'),b=d.body;try{if(!b)throw(0);d.title='(Saving...)'+d.title;z.setAttribute('src','http://www.instapaper.com/j/CJFRXrpfV0rU');b.appendChild(z);}catch(e){alert('Please wait until the page has loaded.');}void(0)})(content.document) | |
" Have more? :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http') | |
, url = require('url') | |
, feedme = require('feedme') | |
, opts = url.parse("http://wtf.cyprio.net/atom/1"); | |
var parser = new feedme(true); | |
parser.on('end', function() { | |
var feed = parser.done(); | |
console.log("Parsing ended... " + feed.title); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A simple Tofu example to speak JSON. | |
* | |
* Compile: | |
* If you make-installed Tofu, skip the -I/-L flags. If not, export | |
* TOFU=/wherever/you/git-cloned/and/built/Tofu | |
* | |
* $ gcc hello.c -ltofu -ljansson -I$TOFU/include -L$TOFU/src/.libs -o hello | |
* | |
* Run: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
require 'rest_client' | |
require 'yajl' | |
@api = RestClient::Resource.new('https://api.trello.com/1') | |
@key = 'API_KEY' | |
@token = 'OAUTH_TOKEN' | |
@login = 'YOUR_LOGIN' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'time' | |
require 'dbus' | |
main = DBus::Main.new | |
trap("INT") { | |
puts "Quitting..." | |
main.quit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"net/url" | |
"os" |
OlderNewer