Skip to content

Instantly share code, notes, and snippets.

@ivanzoid
ivanzoid / setupGOROOT.sh
Created August 26, 2012 10:43
Aumatically setup $GOROOT in HomeBrew
#
# Place this code to your .profile, .bashrc, .bash_profile or whatever
#
program_exists () {
type "$1" &> /dev/null ;
}
if program_exists go; then
@STAR-ZERO
STAR-ZERO / SampleFragment.java
Created December 18, 2012 08:39
【Android】AsyncTaskLoaderのサンプル
public class SampleFragment extends Fragment implements LoaderCallbacks<String> {
private static final int LOADER_ID = 0;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_main, container, false);
}
@Override
@tsupo
tsupo / Twitter_API_1.1_rate_limit.txt
Created May 17, 2013 05:12
Twitter API 1.1 / 実行回数制限
Twitter API 1.1 の現行APIの制限
(REST API v1.1 Limits per window by resource)
https://dev.twitter.com/docs/rate-limiting/1.1/limits
・15分辺り最大何回実行できるか
Timelines
GET statuses/mentions_timeline 15回
GET statuses/user_timeline 180回/user, 300回/application
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
anonymous
anonymous / anna-tan
Created December 2, 2013 09:17
アキチャッター
. ; . ..:::,..
,s555Srr;rrisSSs;:. ,. .::
,G5: .:;sSi; :ir;iX .2r.;9.
;@2B s2r . .;2i;sr s5 .5sAr .M
r@r@ , .3r :@r h. ;i rhs. s
r ;H;;2: :: 3; ;s Sr r.
:Ssr;2, ,G i5i .M &, Br;i::5, ;i H
ii, r#@i. H r:2 A. X:9 ;i r. ;@:3&h: B 9,
h @X.::B :iBi S S; ;s 2. H rS . Mr ;,s; & ,M
,2 .. ;2 r;B 5;
@suzuken
suzuken / ua.js
Last active September 9, 2020 15:22
experimental UDF on Bigquery with https://github.com/woothee/woothee-js.
var root = this;
// embed: dataset, util, browser, mobilephone, crawler, appliance, misc, woothee
// GENERATED from dataset.yaml at Thu Aug 13 14:22:28 JST 2015 by tagomoris
// Snapshot from package.json
var package_info = {"name":"woothee","version":"1.2.0","description":"User-Agent string parser (js implementation)","main":"./release/woothee","devDependencies":{"mocha":">= 1.7.0","chai":">= 1.3.0","js-yaml":">= 1.0.3","should":"~1.2.2"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/woothee/woothee-js"},"author":"tagomoris","license":"Apache v2"};
var dataset = {};
(function(){
HANDLERS = Hello \
my.LogAggregator \
my.CountDaily \
my.CountHourly \
supecial.LogCollector
BRANCH=$(shell git rev-parse --abbrev-ref @)
JAR=$(BRANCH)/myproject-assembly-0.1.jar
all:
@suin
suin / README.md
Last active May 14, 2018 12:32
iTerm2の背景をポケモンにできるツールLazoCoder/Pokemon-Terminalの日本語ローマ字版データです。

iTerm2の背景をポケモンにできるツールLazoCoder/Pokemon-Terminalの日本語ローマ字版データです。英語名のポケモンじゃ分からない人向けです。例えば、イーブイにしたいときpokemon eeveeと打たないといけないところが、このデータをインストールするとpokemon i-buiでできるようになります。

インストール方法

Pokemon-Terminalをインストールした後に次のコマンドを実行して、ポケモン名データを書き換えてください

wget https://gist.githubusercontent.com/suin/7ba1e2b7a1feb5d0c01a6756f736d24d/raw/b210c99b105cf1a4a6854a55cf3d2f95dc981eba/pokemon.txt -O $HOME/.Pokemon-Terminal/Data/pokemon.txt
@voluntas
voluntas / loadtest.rst
Last active July 6, 2024 00:34
負荷試験コトハジメ
@niw
niw / README.en.md
Last active July 23, 2024 15:51
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 10/1/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac