Skip to content

Instantly share code, notes, and snippets.

View kitsuyui's full-sized avatar
🐢

kitsuyui kitsuyui

🐢
View GitHub Profile
@kitsuyui
kitsuyui / brew.cask.list.txt
Created May 29, 2014 09:48
私が Homebrew と Homebrew Cask でインストールしたパッケージのリスト。
appcleaner
dropbox
firefox
gimp
google-chrome
iterm2
keyremap4macbook
kobito
libreoffice
linein
@kitsuyui
kitsuyui / apphistory.sh
Last active August 29, 2015 14:12
.bash_history のように、アプリケーションの使用履歴をファイルに記録するスクリプト
#!/bin/sh
#### begin settings ####
log_to=~/.app_history
idle_min_seconds=300
duration=1
idling_app_name='#Idle'
#### end settings ####
--- setup.py.orig 2013-02-18 02:24:16.000000000 +0900
+++ setup.py 2015-01-20 20:20:20.000000000 +0900
@@ -7,7 +7,7 @@
return os.popen(str).readlines()[0][:-1]
def cmd2(str):
- return string.split (cmd1(str))
+ return cmd1(str).split()
setup(name = "mecab-python",
@kitsuyui
kitsuyui / a.c
Last active August 29, 2015 14:14
基本の話: 「変数や関数を節約すればパフォーマンスが上がる」わけではない ref: http://qiita.com/kitsuyui/items/1275ba79c423f2d85530
#include <stdio.h>
int main(void)
{
printf("%d\n", 24);
return 0;
}
@kitsuyui
kitsuyui / UIImage+fixOrientation.swift
Created February 4, 2015 12:47
Swift で UIImage の方向を強制的に変換する ref: http://qiita.com/kitsuyui/items/c8d76acfa0ecd6570fdb
//
// UIImage+fixOrientation.swift
//
import UIKit
extension UIImage {
func fixOrientation () -> UIImage {
if self.imageOrientation == UIImageOrientation.Up {
return self
@kitsuyui
kitsuyui / file0.txt
Created February 4, 2015 15:52
pip install で SVN のリビジョンを指定する場合 ref: http://qiita.com/kitsuyui/items/ec2c4aeef4562864df68
$ pip install 'svn+http://cabocha.googlecode.com/svn/trunk/python@r99'
$ awk '{s += $1} END {print s}' < sample-1.txt
18
#!/usr/bin/env bash -eu
cd "${0%/*}" && exec > .gitignore
gibo osx
gibo linux
gibo vagrant
gibo python
cat <<'EOF'
.foobar.conf
something_*.log
@kitsuyui
kitsuyui / chromeurls
Last active August 29, 2015 14:15
OS X で Google Chrome の「今開いてる URL とタイトルを全て取得」 ref: http://qiita.com/kitsuyui/items/b65ac4b3ff9d70f677dc
#!/usr/bin/env osascript
set o to ""
tell application "Google Chrome"
repeat with w in windows
repeat with t in (tabs of w)
set o to (o & (url of t) & "\t" & (name of t) & "\n")
end repeat
end repeat
end tell
return text 1 thru -2 of o
@kitsuyui
kitsuyui / autofalke
Last active August 29, 2015 14:15
Python の Lint (文法チェッカ) まとめ - flake8 + hacking を使う - ref: http://qiita.com/kitsuyui/items/5ab4608003a29ff7689f
$ autoflake -i --remove-all-unused-imports --remove-unused-variables main.py