Skip to content

Instantly share code, notes, and snippets.

@jyap808
jyap808 / decrypt_gpg_armor.go
Created January 4, 2014 01:05
Decrypting an ASCII armored GPG encrypted string in Golang
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"code.google.com/p/go.crypto/openpgp/armor"
"fmt"
"io/ioutil"
"log"
)
@Watson1978
Watson1978 / AppDelegate.rb
Created July 26, 2012 01:35
MacRuby : Mountain Lion + Notification
#
# AppDelegate.rb
# notify
#
# Created by watson on 2012/07/26.
#
module Notification
module_function
def send(title, text)
@Watson1978
Watson1978 / timer.rb
Created November 4, 2011 15:03
MacRuby : Sample of NSTimer
# -*- coding: utf-8 -*-
framework "Cocoa"
class AppDelegate
def initialize
# NSTimer の初期化
@timer = NSTimer.scheduledTimerWithTimeInterval(1.0,
target:self,
selector:"output:",
userInfo:nil,
@sinisterchipmunk
sinisterchipmunk / LICENSE
Last active September 8, 2023 17:57
tar, gzip, and untar files using ruby in memory without tempfiles
Copyright (C) 2011 by Colin MacKenzie IV
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@randrews
randrews / hello.lua
Created August 8, 2011 05:04
Embedding Lua in C
-- Pack this into an object file with ld: ld -r -b binary -o hello.o hello.lua
print "Hello, World!"