This file contains 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 | |
OPENSSL_VERSION="1.0.1g" | |
curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz | |
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
mv openssl-$OPENSSL_VERSION openssl_i386 | |
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
mv openssl-$OPENSSL_VERSION openssl_x86_64 | |
cd openssl_i386 |
This file contains 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
// | |
// Using CoreLocation on Mac OS X with command-line | |
// $ clang CoreLocationTest.m -framework cocoa -framework CoreLocation | |
// $ ./a.out | |
// location service enabled | |
// 2011-12-01 21:03:01.839 a.out[10214:903] latitude,logitude : 35.606647, 140.695538 | |
// 2011-12-01 21:03:01.842 a.out[10214:903] timestamp : 2011-12-01 21:01:36 +0900 | |
// tmiz moo@tmiz.net | |
// | |
#import <cocoa/cocoa.h> |
This file contains 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 python | |
import shelve | |
import sys,os | |
import onetimepass as otp | |
def usage(): | |
print "myonetime <domain> <secret> : register secret" | |
print "myonetime <domain> : create one time password" |
This file contains 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
import json | |
import numpy as np | |
from sets import Set | |
with open("BusinessSpending.json") as f: | |
data = json.load(f, 'latin-1') | |
entries = data["raw_data"] | |
keys = [] | |
for entry in entries: | |
keys = entry.keys() |
This file contains 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
$(function(){ | |
function startRotate() { | |
$("#reload").css("-webkit-animation-name", "loadingRotate"); | |
$("#reload").css("-webkit-animation-duration", "1s"); | |
$("#reload").css("-webkit-animation-iteration-count","infinite"); | |
$("#reload").css("-webkit-animation-play-state", "running"); | |
} | |
function stopRotate() { | |
$("#reload").css("-webkit-animation-play-state", "paused"); |
This file contains 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
from wordpress_xmlrpc import Client, WordPressPost | |
from wordpress_xmlrpc.methods.posts import NewPost | |
from wordpress_xmlrpc.methods import posts | |
import os.path | |
import sys | |
def read_config(filepath): | |
with open(filepath) as f: | |
lines = f.readlines() | |
return lines[0:3] |
This file contains 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 | |
if ! [ -f $1] | |
then | |
touch $1 | |
fi | |
open -a /Applications/Sublime\ Text\ 2.app $1 |
This file contains 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
At first, install xcode. | |
And execute following commands. | |
XXXXXX is revision number. | |
$ svn co http://src.chromium.org/svn/trunk/tools/depot_tools | |
$ export PATH=$PATH:`pwd`/depot_tools | |
$ gclient config http://src.chromium.org/svn/trunk/src | |
$ gclient sync --revision src@XXXXXX | |
$ cd src/ | |
$ GYP_GENERATORS=make GYP_DEFINES=mac_sdk=10.7 ./build/gyp_chromium |
This file contains 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
// (C)2011 to3oo mi2ukam1 tmiz.net | |
// | |
// interposing on objc sample | |
// $ g++ main.m -framework cocoa | |
// $ ./a.out | |
// 2011-12-20 12:12:37.159 a.out[533:903] hello | |
// 2011-12-20 12:12:37.164 a.out[533:903] world | |
#include <cocoa/cocoa.h> | |
#include <objc/objc-class.h> |
This file contains 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
using System; | |
using System.Threading; | |
using MonoMac.Foundation; | |
namespace KVOTestClock | |
{ | |
[Register("KVOTest")] | |
public class KVOTest : NSObject | |
{ | |
public KVOTest () |
NewerOlder