Skip to content

Instantly share code, notes, and snippets.

View ikr7's full-sized avatar
🅰️
rch Linux

ikr7

🅰️
rch Linux
View GitHub Profile
@ikr7
ikr7 / speech.js
Last active August 29, 2015 14:01
ツイート読み上げ
var Command = require('../lib/command.js'),
exec = require('child_process').exec,
MeCab = require('mecab-async'),
mecab = new MeCab();
var say = new Command(function(twit, status, CONFIG){
if(status.retweeted_status) status = status.retweeted_status;
mecab.parse(status.text, function(err, result){
if(!err){
@ikr7
ikr7 / index.js
Created May 28, 2014 13:59
ツイート読み上げ
var Command = require('../../lib/command.js'),
async = require('async'),
split = require('./split.js'),
exec = require('child_process').exec;
var say = new Command(function(twit, status, CONFIG){
if(status.retweeted_status){
status = status.retweeted_status
@ikr7
ikr7 / gist:0dd8971905059b3ababe
Created June 9, 2014 07:19
BeagleBone Black Rev.C にはじめから入ってたやつメモ
root@beaglebone:~# npm ls -g
/usr/local/lib
├─┬ bonescript@0.2.4
│ ├─┬ epoll@0.0.7
│ │ └── nan@0.4.4
│ ├─┬ express@3.1.0
│ │ ├── buffer-crc32@0.1.1
│ │ ├── commander@0.6.1
│ │ ├─┬ connect@2.7.2
│ │ │ ├── bytes@0.1.0
@ikr7
ikr7 / button.js
Created June 10, 2014 11:34
ボタンがおされたらアレみたいなやつ
var b = require('bonescript');
b.pinMode('P8_19', b.INPUT);
setInterval(check, 100);
function check(){
b.digitalRead('P8_19', checkButton);
}
PublicHair API
An API that generates public hair image. Outputs PNG, JPEG, Animated GIF, SVG and JSON.
API Endpoint is "/v1/[width]x[height].[type]". Max size is 1024x1024. If type is "gif", max size is 512x512.
Parameters
amount: Specifies number of hair. defaults to 15. max is 1000.
@ikr7
ikr7 / memo.ls
Last active August 29, 2015 14:02
#LiveScript メモ
#関数定義
add = (x, y) --> x + y
add 5 6 #=> 11
#中置記法
4 `add` 6 #=> 10
@ikr7
ikr7 / glitch.js
Last active August 29, 2015 14:02
Glitch画像作るやつ
var fs = require('fs');
var inImageData = false;
var o = Math.random() * 255 | 0,
r = Math.random() * 255 | 0;
var orig = fs.readFileSync('./original.jpg'),
glit = new Buffer(orig.length);
@ikr7
ikr7 / usage.md
Last active August 29, 2015 14:03
コマンド一覧
@rfc4627 rotate [角度]

アイコンを右に回します。

@rfc4627 shindan [診断のID] [診断する名前]

自動で 診断メーカーします。ID はURL末尾の数字です。

var glitch = module.exports = function(origData, params){
if(
checkType(params, 'params', 'object')
){
var params = getNormalizedParameters(params),
jpg_header_length = getJpegHeaderSize(origData);
@ikr7
ikr7 / fabeep.js
Last active August 29, 2015 14:04
BBBであそぼう
// アレの commands/ に入れる
var Command = require('../lib/command.js'),
request = require('request');
var fabeep = new Command(function(twit, data, CONFIG){
request.get({
'uri': 'http://192.168.7.2:8123/beep' // ←ここ適当に変えろ
}, function(){}); // ←エラーはにぎりつぶす
});