Skip to content

Instantly share code, notes, and snippets.

View kai-inokuchi's full-sized avatar
🦔

Kai Inokuchi kai-inokuchi

🦔
View GitHub Profile
@pol
pol / set_iTerm_background.sh
Created January 11, 2011 01:42
Set the background color of iTerm based on RAILS_ENV
#!/usr/local/bin/bash
set_term_bgcolor(){
local R=$1
local G=$2
local B=$3
/usr/bin/osascript <<EOF
tell application "iTerm"
tell the current terminal
tell the current session
@nobu666
nobu666 / gist:2146276
Last active January 21, 2019 14:16
awk http server
awk 'BEGIN{s="/inet/tcp/80/0/0";"pwd" |& getline;r=$0;while((s |& getline) > 0){gsub(/[\r\n]/,"");if($0 ~ /^\s*$/){c="cat " r path;printf "HTTP/1.0 200 OK\r\n\r\n" |& s;while((c |& getline) > 0){print |& s}close(c);close(s)}else if($0 ~ /HTTP/){print;path=$2}}}'
@voluntas
voluntas / webrtc.rst
Last active June 27, 2024 02:25
WebRTC コトハジメ
@voluntas
voluntas / realtime_movie_stream.rst
Last active May 18, 2023 04:25
リアルタイム動画配信コトハジメ