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
| # this is a comment | |
| # see CPUFREQD.CONF(5) manpage for a complete reference | |
| # | |
| # Note: ondemand/conservative Profiles are disabled because | |
| # they are not available on many platforms. | |
| [General] | |
| pidfile=/var/run/cpufreqd.pid | |
| poll_interval=2 | |
| verbosity=4 |
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
| # node v0.10.10 | |
| crypto = require "crypto" | |
| secretKey = [ | |
| 0xff, 0x03, 0x44, 0x89, 0xd6, 0xf8, 0x98, 0x21, | |
| 0x1f, 0xad, 0xaa, 0xda, 0x39, 0x9d, 0x3f, 0x8e, | |
| 0xbc, 0xd5, 0xa1, 0x00, 0xe1, 0x36, 0xfa, 0xcc, | |
| 0xe7, 0x48, 0x0a, 0x0e, 0x44, 0x1c, 0xf6, 0xaf, | |
| ] | |
| secretKeyBuf = new Buffer(secretKey) |
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
| # node v0.10.10 | |
| crypto = require "crypto" | |
| secretKey = [ | |
| 0xff, 0x03, 0x44, 0x89, 0xd6, 0xf8, 0x98, 0x21, | |
| 0x1f, 0xad, 0xaa, 0xda, 0x39, 0x9d, 0x3f, 0x8e, | |
| 0xbc, 0xd5, 0xa1, 0x00, 0xe1, 0x36, 0xfa, 0xcc, | |
| 0xe7, 0x48, 0x0a, 0x0e, 0x44, 0x1c, 0xf6, 0xaf, | |
| ] | |
| secretKeyBuf = new Buffer(secretKey) |
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
| # -*- coding:utf-8 -*- | |
| import sys | |
| import traceback | |
| import datetime | |
| from dateutil.parser import parse | |
| import pytz | |
| import json | |
| import tweepy |
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
| uuid = require 'node-uuid' | |
| hex1str = uuid.v4().replace(/-/g, "") | |
| hex1buf = new Buffer(hex1str, "hex") | |
| hex2str = uuid.v4().replace(/-/g, "") | |
| hex2buf = new Buffer(hex2str, "hex") | |
| result = new Array() | |
| for i in [0...hex1buf.length] | |
| r = hex1buf[i] ^ hex2buf[i] | |
| result.push r |
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
| // AssetsLibrary.frameworkを追加し、 | |
| // .hで@property (nonatomic, strong) ALAssetsLibrary *library;とか宣言しておく | |
| // 以下は、カメラロール内のある時点以降の画像をすべてUITableViewに表示しようとしている例 | |
| -(void)initAssetsLibrary | |
| { | |
| // TODO 保存時刻古い順でソートしたい → AssetsLibrary標準のAPIではできない | |
| static dispatch_once_t pred = 0; | |
| dispatch_once(&pred, ^{ | |
| self.library = [[ALAssetsLibrary alloc] init]; |
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
| // 与えられた正方形のImageViewと1から0のパーセント値に対して、タコメーター風の円弧を描くメソッド | |
| - (void)drawArcToUIImageView:(UIImageView *)targetImageView withPercntage:(CGFloat)percnt | |
| { | |
| targetImageView.layer.needsDisplayOnBoundsChange=YES; | |
| UIGraphicsBeginImageContext(targetImageView.frame.size); | |
| struct CGContext *context = UIGraphicsGetCurrentContext(); | |
| CGPoint arcCenter = CGPointMake(targetImageView.frame.size.width/2, targetImageView.frame.size.height/2); | |
| CGFloat outerRadius = (targetImageView.frame.size.width/2.0f)-1.0f; | |
| CGFloat innerRadius = (targetImageView.frame.size.width/2.0f)-4.0f; |
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
| if [ $# -ne 1 ]; then | |
| echo "usage: ustreamdump.sh channenName" | |
| exit 1 | |
| fi | |
| chid=$(wget http://api.ustream.tv/json/channel/${1}/getInfo?key=yourDevKey -q -O -|grep -Po '"id":[0-9]*?,'|grep -Po '[0-9]*') | |
| if [ ! ${chid} ]; then | |
| echo "api error, channelName: ${1}" | |
| exit 1 | |
| fi |
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
| rtmpdump -v -r “rtmp://flash83.ustream.tv:1935/ustreamVideo/5883040/streams/live” -a "ustreamVideo/5883040" -y "streams/live" -f “LNX 10,1,58,3” -o `date +%s`.flv --stop 10 |
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 EnableGoogleWebHistory | |
| // @author mallowlabs | |
| // @namespace http://mallowlabs.s206.xrea.com/ | |
| // @version 0.0.2 | |
| // @license public domain | |
| // @description : Enable Google Web History | |
| // @published 2007-01-05 | |
| // @modified 2006-01-05 | |
| // @include * |