Skip to content

Instantly share code, notes, and snippets.

View giginet's full-sized avatar
🌴
年中On vacation

Kohki Miki giginet

🌴
年中On vacation
View GitHub Profile
@giginet
giginet / 0_reuse_code.js
Created March 20, 2014 10:56
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Decksetがよかった話


自己紹介

require 'rubygems'
require 'mechanize'
require 'rss'
require 'yaml'
require 'open-uri'
######################
#HBtomixi Ver1.0
#はてなダイアリの記事とmixiを同期させます。
#詳細や使い方など:
#コードの改変、再配布は出典明記の上可
@giginet
giginet / iPhoneSoundConverter.py
Created June 25, 2011 01:02
iPhoneSoundConverter.py
import os
import sys
path = sys.argv[1] if len(sys.argv) >= 2 else os.getcwd()
os.chdir(path)
for file in os.listdir(path):
filename, ext = os.path.splitext(file)
if ext in ('.wav', '.mp3', '.aif'):
os.system('/usr/bin/afconvert -f caff -d LEI16 %s %s.caf' % (file, filename))
print 'create %s.caf' % filename
@giginet
giginet / test
Created September 27, 2011 06:31
testtest
@giginet
giginet / buildenv.sh
Created October 8, 2011 10:10 — forked from lambdalisue/buildenv.sh
Build python develop environment via pythonbrew
#!/bin/bash
PLATFORM=`uname`
PYTHON_VERSION=2.7.2
if [ "$PLATFORM" = 'Linux' ]; then
echo "Installing required packages..."
yes | sudo apt-get install curl python-all-dev python3-all-dev
yes | sudo apt-get install libreadline6-dev libsqlite3-dev libgdbm-dev
yes | sudo apt-get install libbz2-dev build-essential libxml2-dev libxslt1-dev
# Patch for PIL
@giginet
giginet / hatena.py
Created October 8, 2011 19:04
django-social-oauth Hatena auth backend
# -*- coding: utf-8 -*-
"""
Hatena OpenID support
This is a custom backend for django-social-auth. This adds support for Hatena oauth service.
An application must be registered first on hatena and the settings HATENA_CONSUMER_KEY
and HATENA_CONSUMER_SECRET must be defined in your settings.py.
ref : http://developer.hatena.ne.jp/ja/documents/auth/apis/oauth/consumer
"""
__author__ = 'giginet'
brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi
curl -O http://pygame.org/ftp/pygame-1.9.1release.tar.gz
tar xfz pygame-1.9.1release.tar.gz
curl -O https://raw.github.com/gist/1150088
patch -p0 < 1150088
cd pygame-1.9.1release
python setup.py build
python setup.py install
(console.log "#{i}月はCoffeeScriptで酒が飲めるぞー酒が飲めるぞー" for i in [1..12])
for(i in 1:12){
print(paste(i, "月はRで酒が飲めるぞー酒が飲めるぞー"))
}