Skip to content

Instantly share code, notes, and snippets.

View sgk's full-sized avatar

Shigeru KANEMOTO sgk

  • Switch Science /144Lab
  • Tokyo / Osaka
View GitHub Profile
@sgk
sgk / gist:5788552
Last active December 18, 2015 13:18
Ubuntuをインストールしたら行う設定
% sudo apt-get install aptitude
% sudo apt-get install virtualbox-guest-utils
% sudo apt-get purge unity-lens-music unity-lens-photos unity-lens-video
% sudo apt-get purge unity-scope-gdrive unity-scope-musicstores unity-scope-video-remote
% sudo apt-get purge unity-webapps-common
% sudo apt-get purge xul-ext-ubufox xul-ext-unity xul-ext-webaccounts xul-ext-websites-integration
% sudo apt-get purge ubuntuone-client python-ubuntuone-client python-ubuntuone-storageprotocol
% sudo vi /etc/default/ntpdate
% sudo apt-get install ntp
% sudo vi /etc/ntp.conf
@ytsuboi
ytsuboi / ir_send.ino
Created January 8, 2013 14:20
Arduinoを赤外線リモコンにするスケッチ。 とりあえず家電協とNECフォーマットに対応。たぶんSONYフォーマットにも対応させます。
/*
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2013 Yoshihiro TSUBOI <ytsuboi-at-gmail.com>
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
@creotiv
creotiv / gist:1217855
Created September 14, 2011 21:34
Multicore gevent wsgi server
import sys
from gevent import server
from gevent.baseserver import _tcp_listener
from gevent import pywsgi
from gevent.monkey import patch_all; patch_all()
from multiprocessing import Process, current_process, cpu_count
def hello_world(env, start_response):
if env['PATH_INFO'] == '/':
start_response('200 OK', [('Content-Type', 'text/html')])
@sgk
sgk / fix-id3.py
Created March 31, 2011 15:43
ID3タグにダメなエンコーダソフトがつっこんだ、SJIS文字列を修正する。 eyeD3を使用 http://eyed3.nicfit.net/
#vim:fileencoding=utf-8
#
# 古いMP3エンコードソフトを使った時、
# ID3タグにSJIS文字列が入っているのを修正する。
#
# エンコーディングがLatin-1なのにSJISらしき物を修正。
#
# 2011-3-31 Shigeru KANEMOTO
# Public Domain
#