Skip to content

Instantly share code, notes, and snippets.

@tsu-nera
tsu-nera / EllysRoomAssignmentsDiv2.h
Created April 26, 2013 17:27
TopCoder SRM577 Dev2 250
/* TopCoder
* SRM : 577
* Division : 2
* Level : 1
*
* Created on:
* Author: tsu_nera<fox10225fox@gmail.com>
*/
#include <algorithm>
#include <iostream>
@tsu-nera
tsu-nera / enable_emacs.sh
Created May 1, 2013 06:47
Emacs デーモン起動シェル -r オプションで再起動
#!/bin/bash
# option -r is Reboot
if [ "$1" = "-r" ]; then
echo "Reboot Emacs Daemon"
emacsclient -e '(kill-emacs)'
fi
# start emacs
emacs --daemon
@tsu-nera
tsu-nera / gist:5501868
Created May 2, 2013 12:26
.gitignore for Visual Studio ,C++ Project
# gitignore for C++
# Compiled Object files
*.slo
*.lo
*.o
# Compiled Dynamic libraries
*.so
*.dylib
@tsu-nera
tsu-nera / twitter.rb
Created May 2, 2013 17:36
Twitterにコマンドラインから投稿するRubyスクリプト
#!/usr/bin/ruby
require 'twitter'
@client = Twitter::Client.new(
:consumer_key => "hoegehoge",
:consumer_secret => "hoegehoge",
:oauth_token => "hoegehoge",
:oauth_token_secret => "hoegehoge")
@client.update ARGV[0]
@tsu-nera
tsu-nera / DeerInZooDivTwo.h
Created May 3, 2013 03:00
TopCoder SRM 578 div 250
/* TopCoder
* SRM : 578
* Division : 2
* Level : 1
*
* Created on: 2013/05/03(Fri)
* Author: tsu_nera<fox10225fox@gmail.com>
*/
#include <algorithm>
#include <iostream>
@tsu-nera
tsu-nera / make_lnlink.sh
Created May 12, 2013 11:20
dotfilesのシンボリックをホームディレクトリに作成するシェルスクリプト
@tsu-nera
tsu-nera / generate_cmock.sh
Created May 12, 2013 13:02
指定されたディレクトリのインクルードファイルからモックファイルを自動生成するためのシェルスクリプト
#!/bin/bash
MOCK_DIR=mocks
# 指定されたディレクトリが存在するかチェック
if [ ! -d "$1" ]; then
echo 'error: input include directory path'; exit 1
else
# 絶対パスになおす
INCLUDE_DIR="${PWD}/$1"
@tsu-nera
tsu-nera / gitpush_expect.sh
Created May 25, 2013 12:40
Cygwinでのgit pushでパスワード省略
#!/usr/bin/zsh
# ログイン情報
username=tsu-nera
password=************
# expect コマンドを実行
expect -c "
# タイムアウト値の指定
set timeout 20
@tsu-nera
tsu-nera / .zshrc
Created May 25, 2013 12:55
.zshrcのとりあえず記録用
###############
# zsh Setting
###############
###############
# ヒストリ関連
###############
# 履歴の保存先
HISTFILE=$HOME/.zsh-history
## メモリに展開する履歴の数
@tsu-nera
tsu-nera / picasa_post.bat
Created July 6, 2013 13:41
ブログ画像 Google Picasa投稿用バッチファイル 1. Google Picasa にドラッグ & ドロップで投稿 2. 投稿した画像のURLを取得 3. <img src="URL"></a>に変換
@echo off
chcp 932
set file=%*
rem Picasaに投稿
python "C:\Python26\Scripts\google" picasa post Futurismo "%file%"
rem URL取得
for /f "usebackq tokens=*" %%a in (`python "C:\Python26\Scripts\google" picasa list --fields=url-direct --query "%file:C:\Users\TSUNEMICHI\Desktop\=%"`) do @set x=%%a