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
$ xcode-select --install |
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 | |
def rotate interval | |
while true | |
"|/-\\|/-\\".chars.each {|c| print "\r#{c}"; sleep interval} | |
end | |
end | |
rotate 0.1 |
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
import random | |
ZUN = "zun" | |
DOKO = "doko" | |
KIYOSHI = "kiyoshi!" | |
ZUNDOKO = [0,0,0,0,1] | |
MAXLEN = len(ZUNDOKO) | |
def zundoko(): | |
words = [] |
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
import random | |
ZUN = "zun" | |
DOKO = "doko" | |
MAXLEN = 5 | |
def match(arr): | |
print(arr) | |
if (len(arr) >= MAXLEN |
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
import random | |
ZUN = "zun" | |
DOKO = "doko" | |
MAXLEN = 4 | |
def match(arr): | |
print(arr) | |
if (len(arr) >= MAXLEN |
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
#import <stdio.h> | |
#import <Foundation/NSObject.h> | |
@interface HelloClass : NSObject | |
- (void) sayHello; | |
@end | |
@implementation HelloClass | |
- (void) sayHello { | |
printf("Hello Objective-C world!\n"); |
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
require 'rubygems' | |
require 'mechanize' | |
agent = Mechanize.new | |
agent.set_proxy('proxy.example.com', 80, 'username', 'password') | |
agent.add_auth('http://hoge.com','b_username','b_password') | |
agent.user_agent_alias = "Windows Mozilla" | |
res = agent.get('http://hoge.com/some/page') | |
puts res.body |
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 python | |
from PIL import Image, ImageDraw | |
import random | |
import socialdata as sd | |
def drawnetwork(people,links): | |
img = Image.new('RGB',(500,500),(255,255,255)) | |
draw = ImageDraw.Draw(img) | |
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
class BubbleSort extends Sorter { | |
BubbleSort(boolean debug) { | |
super(debug); | |
} | |
public int[] sort(int[] arr, int start, int end) { | |
printArray(arr); | |
if (end > arr.length-1) { return null; } | |
for (int i=start; i < end; i++) { |
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
// ==UserScript== | |
// @name add_d_link_on_hbm | |
// @namespace http://nitamago.org/ | |
// @include http://b.hatena.ne.jp/entry/* | |
// ==/UserScript== | |
var w = this.unsafeWindow || window; | |
w.addEventListener("load", function() { | |
var my_div_id = "gm_add_d_link"; | |
var my_atag_id = "gm_add_d_link_atag"; |
NewerOlder