Skip to content

Instantly share code, notes, and snippets.

View pgmot's full-sized avatar
🏠
Working from home

mot pgmot

🏠
Working from home
View GitHub Profile
@pgmot
pgmot / Makefile.latex
Last active December 13, 2015 23:49
なんかpdf作るために使ったり
PLATEX = platex
DVIPDFMX = dvipdfmx
BIBTEX = bibtex
TARGET = research_plan
PDF_READER = open
all: $(TARGET).dvi
pdf: $(TARGET).pdf
@pgmot
pgmot / init-loader-func.sh
Created March 24, 2013 05:13
init-loaderでelをオンオフするやつ
function el-on {
for SCRIPT in $@
do
if [ ! -e ~/.emacs.d/inits-available/$SCRIPT.el ]; then
echo "$SCRIPT.el is not found";
else
rm -rf ~/.emacs.d/inits-enable/$SCRIPT.el ~/.emacs.d/inits-enable/$SCRIPT.elc
ln -s ~/.emacs.d/inits-available/$SCRIPT.el ~/.emacs.d/inits-enable/$SCRIPT.el
fi
done
@pgmot
pgmot / gist:7543587
Created November 19, 2013 10:46
IRCからJenkinsおじさん叩き起こすよう
require "sinatra"
require "cinch"
require "yaml"
require "json"
config_file = ARGV.shift || "config.yml"
if not File.exist? config_file
puts "error: Can't find config file #{config_file}"
exit
end
@pgmot
pgmot / heater.rb
Created December 11, 2013 12:39
PCで暖かくするスクリプト
while true do
p "Hoooooooot"
end
# Description:
# syussya
#
# Dependencies:
# "request"
# "cheerio"
#
# Configuration:
# None
#
# Description:
# taisya
#
# Dependencies:
# "request"
# "cheerio"
#
# Configuration:
# None
#
[alias]
graph = log --graph --branches --date=short --decorate=short --pretty=format:'%Cgreen%h %Creset%cd %Cblue%cn %Cred%d %Creset%s'
st = status
gr = log --graph --branches --date=short --decorate=short --pretty=format:'%Cgreen%h %Creset%cd %Cblue%cn %Cred%d %Creset%s'
cm = commit
co = checkout
br = branch
remote-br = branch -r
delete-merged-branches = !git branch --merged | grep -v \\* | xargs -I % git branch -d %
gl = log --pretty='medium-reverse' --graph --name-status
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Usage: $0 <aar_file> [<output_path>]" 1>&2
exit 1
fi
unzip $1 -d /tmp/aar2jar > /dev/null
if [ -z "$2" ]; then
dir=.
@pgmot
pgmot / gist:f77908bc04e6b55f7ad2
Created December 15, 2015 02:40
メールタイトルエンコードデコード
# エンコード
echo '件名' | nkf -jM
# デコード
echo '=?ISO-2022-JP?B?GyRCN29MPhsoQg==?=' | nkf -w -
@pgmot
pgmot / jquery.query-parameter.js
Created December 21, 2015 18:34 — forked from Nully/jquery.query-parameter.js
URLの?以降(GET値)を取得する
// jQuery版に書き換えた
(function($){
var queries = (function(){
var s = location.search.replace("?", ""),
query = {},
queries = search.split("&"),
i = 0;
if(!s) return null;