Skip to content

Instantly share code, notes, and snippets.

View paydro's full-sized avatar
💨

Peter Bui paydro

💨
View GitHub Profile
@paydro
paydro / apns.rb
Created June 13, 2012 23:38 — forked from scotttam/apns.rb
Sends an Apple Push Notification with Ruby
require "rubygems"
require "yajl"
require "openssl"
require "socket"
device_token = '39cac56f 986a0e66 3c4fd4f4 68df5598 024d2ca3 8b9f307c 741c180e 9fc30c62'
device_token = device_token.gsub(" ", "")
the_byte_token = [device_token].pack("H*")
file = File.open("ruby_the_byte_token", "wb")
@paydro
paydro / proxy.go
Created August 20, 2014 17:37 — forked from vmihailenco/proxy.go
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"