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
// Usage: node kasi.js <id> | |
// Example: | |
// Get lyric from http://www.kasi-time.com/item-55961.html | |
// node kasi.js 55961 | |
var http = require('http'); | |
var vm = require('vm'); | |
var no = process.argv[2]; |
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 `underscore` or `lodash` | |
// Figure out type of `obj' | |
var typeid = function (obj) { | |
return Object.prototype.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); | |
}; | |
var ajax = function (method, url, data, options, handler) { | |
if (typeid(options == 'function')) { | |
handler = options; options = {}; |
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
#!/bin/bash | |
# | |
# Screen Rotation Script for Tablet PC (X220T) | |
# | |
# Usage: | |
# `rotator` - rotate screen clockwise to next orientation | |
# `rotator <orientation>` - rotate screen to orientation | |
# `<orientation>` can be | |
# xrandr style : normal,right,inverted,left | |
# xsetwacom style : none,cw,half,ccw |
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 Smile Download | |
// @namespace https://kirisetsz.github.io/ | |
// @version 0.1.1 | |
// @description Download video from Niconico (GINZA) | |
// @match http://www.nicovideo.jp/watch/* | |
// @copyright 2014, kirisetsz | |
// ==/UserScript== | |
var smile = function () { |
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
module.exports = function (capture, handler, forceAll) { | |
var args = Array.prototype.slice.call(arguments, 0); | |
forceAll = args.pop(); | |
if (typeof(forceAll) != 'boolean') { | |
handler = forceAll; | |
forceAll = true; | |
} else { |
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
#!/bin/env python | |
#-*- coding:utf-8 -*- | |
#Utility( | |
def rep(bytes): | |
bytes = float(bytes) | |
if bytes >= 1099511627776: | |
terabytes = bytes / 1099511627776 | |
size = '%.2fT' % terabytes |
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
[Desktop Entry] | |
Type=Application | |
Name=Android Studio | |
Categories=Development;Application; | |
Exec=/opt/android-studio/bin/studio.sh | |
Icon=/opt/android-studio/bin/androidstudio.ico | |
Terminal=false |
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 com.octo.android.robospice.request.springandroid.SpringAndroidSpiceRequest; | |
import org.springframework.core.io.FileSystemResource; | |
import org.springframework.http.HttpEntity; | |
import org.springframework.http.HttpHeaders; | |
import org.springframework.http.HttpMethod; | |
import org.springframework.http.MediaType; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.http.client.ClientHttpRequestFactory; | |
import org.springframework.http.client.SimpleClientHttpRequestFactory; |
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 android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.util.AttributeSet; | |
import android.view.View; | |
public class ProgressCircle extends View { |