Skip to content

Instantly share code, notes, and snippets.

View nyanshiba's full-sized avatar
🎃
in the kotatsu

nyanshiba

🎃
in the kotatsu
View GitHub Profile
@yanbe
yanbe / gist:961328
Created May 8, 2011 12:02
iPhoneのSafariのブックマークレットに選択文字列を渡すサンプル(Safariでブラウジング中に大辞林アプリで選択中の単語を調べる)
javascript:document.addEventListener('gesturestart',function()%7Bvar%20w=window.getSelection();if(w!=%22%22)window.location='mkdaijirin://jp.monokakido.DAIJIRIN/search?text='+encodeURIComponent(w)+'&srcname=Safari&src='+encodeURIComponent(location.href)%7D,false);
/*
前準備:
上記をiPhoneのSafariのブックマークとして登録
使い方:
1. Safariでブラウジング中調べたい単語が見つかったら,ブックマークレットを起動する
 (この段階では何も起こらない.実際にはユーザーがタッチパネル上で何らかのジェスチャーを行なったときに
  発動するイベントがページに仕込まれる)
@hSATAC
hSATAC / 256color.pl
Created July 20, 2011 14:48
256color.pl
#!/usr/bin/perl
# Author: Todd Larason <jtl@molehill.org>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@j5ik2o
j5ik2o / gist:3782873
Created September 25, 2012 16:14
STUN検証結果
手順
$ git clone https://github.com/mtgto/stun-client-ruby.git
$ cd stun-client-ruby
$ ruby main.rb pediaroute.com
---
Apple TimeCapsule
ISP Biglobe/AUひかり
timeout! restarting
@KartikTalwar
KartikTalwar / Documentation.md
Last active June 25, 2024 10:55
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@pekeq
pekeq / gist:6362508
Last active April 10, 2023 05:37
twitterのDNS Attackが、OCNのDNSキャッシュサーバーに残っていたので記録

twitterのDNS Attackが、OCNのDNSキャッシュサーバーに残っていたので記録してみた。

[2013/8/28 18:44追記] キャッシュの中身、正しいものになったようです。

nv6-ef701.ocn.ad.jp. (2001:380:0:4::1)

$ dig twimg.com ns @2001:380:0:4::1

; <<>> DiG 9.9.2-P1 <<>> twimg.com ns @2001:380:0:4::1
@mitsuruog
mitsuruog / memo.md
Last active October 5, 2021 05:37
ios-webkit-debug-proxyを動かすためのメモ
@landonf
landonf / 0_data_prettyprint.json
Created October 19, 2014 23:00
In Yosemite, all Safari web searches are sent to not only the search engine you've selected (e.g., Google, DuckDuckGo), but *also* to Apple, even if you've disabled "Spotlight Suggestions" (System Preferences > Spotlight Suggestions, as per Apple's privacy documentation) and sharing of Usage and Diagnostics data. https://github.com/fix-macosx/yo…
[
{
"timestamp": 0,
"input": "W",
"type": "search_local",
"latency": 0
},
{
"local_results": [
"ddg_search",
@cucmberium
cucmberium / gist:e687e88565b6a9ca7039
Last active February 28, 2024 01:23
Twitterの検索API & Twitterでの検索術

twitterの検索術 (search/tweetssearch/universal)

search/tweets では一週間以上前のツイートは検索できないので注意

search/universal は公式のConsumerKey/ConsumerSecretでないと使用できない

当方では一切の責任を負いません

@fatum12
fatum12 / ttc2ttf.pe
Last active May 2, 2024 02:59
Unpack .ttc and .dfont to .ttf using FontForge
#!/usr/local/bin/fontforge
# Usage: fontforge -script ttc2ttf.pe /path/to/font.ttc
fonts = FontsInFile($1)
n = SizeOf(fonts)
i = 0
while (i < n)
Open($1 + "(" + fonts[i] + ")", 1)
index = ToString(i + 1)