Skip to content

Instantly share code, notes, and snippets.

View uiur's full-sized avatar

Kazato Sugimoto uiur

View GitHub Profile
@uiur
uiur / history.sh
Created August 10, 2015 04:20
sh is a subset of bash in osx
~
❯ /bin/sh --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)
Copyright (C) 2007 Free Software Foundation, Inc.
~
❯ /bin/bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)
Copyright (C) 2007 Free Software Foundation, Inc.
while (true); do echo "Waiting..." ; nc -l -p 8080 | pbcopy; echo "Copied: "; pbpaste | sed 's/^/ /'; done
echo "meow" | nc -c localhost 8080
@uiur
uiur / asset.coffee
Created August 6, 2015 09:26
reworkでrails asset-url 問題をなんとかする
fs = require('fs')
module.exports =
manifest: ->
JSON.parse(fs.readFileSync(__dirname + '/../../../tmp/manifest.json', 'utf8'))
url: (path) ->
@manifest()[path]
tweet() { open "https://twitter.com/intent/tweet?text=$1" }
@uiur
uiur / -
Created August 5, 2015 05:50
echo echo history
@uiur
uiur / index.html
Created July 7, 2015 01:42
css and linear algebra
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="style.css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<div class="box"></div>
</body>
#!/bin/bash
ffmpeg -i "$1" -r 10 -f image2pipe -vcodec ppm - \
| convert -layers Optimize - gif:- \
| gifsicle -O3 --multifile -
@uiur
uiur / twitcasting.sh
Last active August 22, 2017 18:58
vlcでツイキャスを見る
livestreamer hlsvariant://twitcasting.tv/$name/metastream.m3u8/?video=1 best --player /Applications/VLC.app/Contents/MacOS/VLC
@uiur
uiur / download.sh
Last active August 29, 2015 14:22
download nhk news video
rtmpdump -r "rtmp://flv.nhk.or.jp/ondemand/flv/news/k10010107821_201506090918_201506090918.mp4" -o file.mp4
// seeding
swarm.on('peer', function (peer) {
dht.addPeer(peer)
})
// signaling
// hub
hub.subscribe('/channel')
// peer