Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name TogetterFilter
// @namespace TogetterFilter
// @description Togetterを任意のユーザー名を用いてフィルタリング
// @include http://togetter.com/*
// @require https://github.com/azu/usconfig/raw/v1.13/usconfig.js
// ==/UserScript==
// 設定画面の定義 - http://d.hatena.ne.jp/h1mesuke/20100713/p1
Config.define('usc_basic', function() {
with (this.builder) {
@amazedkoumei
amazedkoumei / background.html
Created April 29, 2012 18:23
chrome-ext-paga-action-template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!-- some library if i need -->
<script type="text/javascript" src="./background.js"></script>
</head>
<body>
background.html
</body>
@amazedkoumei
amazedkoumei / gist:2563980
Created May 1, 2012 00:28
print_r by javascript
function print_r(arr, br, nbsp) {
br = (br) ? br : "\n";
nbsp = (nbsp) ? nbsp : " ";
function dump(arr, br, nbsp, level) {
var dumped_text = "";
if(!level) {
level = 0;
}
//The padding given at the beginning of the line.
var level_padding = "";
@amazedkoumei
amazedkoumei / asyncTest_method_tips.js
Created May 1, 2012 00:31
qunit and mockjax sample
/*
* コメントの数字は実行される順序です。
* asyncTestメソッドはstart()メソッドが実行されるまで次のテストの実行を待機します。
*/
asyncTest("test1",function(){ // 1
doSomething(); // 4
start();
});
asyncTest("test2",function(){ // 2
start();
@amazedkoumei
amazedkoumei / gist:2700993
Created May 15, 2012 11:25
Windowsでカレントディレクトリ以下の.svnを削除する魔法のコマンド
for /R /D %I in (.svn) do RMDIR "%I" /S /Q
@amazedkoumei
amazedkoumei / ipad3.py
Created May 20, 2012 17:48
Bookscan FileName Converter
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os, re
path = os.getcwd() + "/"
p = re.compile('ipad3_(.+?)(\d+?p)_\d+?X?.pdf', re.IGNORECASE)
errBuff = []
for name in os.listdir("./"):
@amazedkoumei
amazedkoumei / NSDate.m
Created May 20, 2012 20:57
Objective-C logging
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
NSString *format = @"yyyy/MM/dd HH:mm:ss Z";
[formatter setDateFormat:format];
NSDate *date = [[NSDate alloc] initWithString:@"2010-01-01 23:59:59 +0900"];
NSLog(@"date:%@", [formatter stringFromDate:date]);
@amazedkoumei
amazedkoumei / ios_crash_report.sh
Created June 14, 2012 20:02
copy crash report of ios to desktop
#!/bin/bash
~/Desktop/crashlog.tar.gz ~/Library/Logs/CrashReporter/MobileDevice
@amazedkoumei
amazedkoumei / error.log
Created September 27, 2012 18:46
ruby motion deploy error
$ rake device --trace
** Invoke device (first_time)
** Invoke archive (first_time)
** Invoke build:device (first_time)
** Execute build:device
** Execute archive
** Execute device
XCODE_DIR="/Applications/Xcode.app/Contents/Developer" /Library/RubyMotion/bin/deploy -d "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" "./build/iPhoneOS-6.0-Development/clipTo.ipa"
log: subscribing to device notification
log: found usb mobile device XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@amazedkoumei
amazedkoumei / tip.html
Created September 29, 2012 02:14
html tips
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<!-- deviceの横幅に合わせる -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
</body>
</html>