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 | |
| begin | |
| require 'curb' | |
| rescue LoadError | |
| puts "This utillity depends on the curb library. (gem install curb)" | |
| exit 1 | |
| end | |
| max = ARGV.map{ |p| File.basename p }.map(&:length).max |
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
| #!/bin/bash | |
| OSD=true # Notify when the screenshot has been uploaded (requires imagemagick and libnotify) | |
| name="`date +%s`.png" # The local file name of the screenshot | |
| function save { | |
| case "$1" in | |
| selection) | |
| `scrot -bs /tmp/$name 2> /dev/null` | |
| ;; |
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
| <?php | |
| $row = FALSE; | |
| // show the first row in the table. | |
| print "<tr> | |
| <td colspan=\"3\" class=\"sechead\"><span>C</span>ontact <span>I</span>nfo</td> | |
| </tr>"; | |
| // now foreach the bastards array... | |
| foreach($contactArray as $key=>$value) { | |
| if ($value == NULL || $key == "user_id" || $key == "pc_id" || trim($value) == "") | |
| continue; |
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 | |
| oldrev, newrev, refname = gets.split | |
| repository = File.expand_path($0)[/([^\/]*?)\.git/] | |
| refs, type, name = refname.split ?/ |
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
| # encoding: utf-8 | |
| module Grooveshark | |
| module Players | |
| class MPlayer | |
| attr_accessor :stream | |
| def initialize stream = nil | |
| @stream = stream | |
| @streaming = false |
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
| set source to POSIX path of "/tmp/it.metabox.png" | |
| do shell script "screencapture -i " & source | |
| tell application "Finder" | |
| if exists source as POSIX file then | |
| set response to do shell script "curl -F file=@" & source & " metabox.it" | |
| if response starts with "http" then | |
| set the clipboard to response & ".png" |
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
| #include <iostream> | |
| void blablabla(); | |
| using namespace std; | |
| int main() { | |
| blablabla(); | |
| cin.get(); | |
| return 0; |
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 'socket' | |
| DefaultHost = 'dpmaster.deathmask.net' | |
| DefaultPort = 27950 | |
| ChunkSize = 2**16 | |
| UDPSocket.new.tap do |socket| |
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 'json' | |
| require 'net/http' | |
| module Google | |
| class Location | |
| def self.search address | |
| new(mac: address).search |
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 'pulse' | |
| Pulse.connect hostname: 'uplink.io', nickname: 'Ulla2' do | |
| catch :connection_ready do | |
| join "#uplink" | |
| end |