Skip to content

Instantly share code, notes, and snippets.

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by UFRaw configure 0.17, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/ufraw/0.17 --without-gtk --without-gimp
## --------- ##
## Platform. ##
@shenqi
shenqi / Tumblr.pm
Created March 1, 2011 22:29
Plagger::Plugin::Publish::Tumblr
package Plagger::Plugin::Publish::Tumblr;
use strict;
use warnings;
use Config::Pit;
use base qw( Plagger::Plugin );
use Encode;
use Time::HiRes qw(sleep);
use WWW::Tumblr;
@shenqi
shenqi / classicfm.rb
Created February 22, 2012 01:22
Notify Classic.fm #NowPlaying
#!/usr/bin/env ruby -Ku
require 'net/http'
require 'rubygems'
require 'nokogiri'
require 'meow'
$appname = 'Classic.fm'
$image = '/Applications/Play.app/Contents/Resources/Play.icns'
@shenqi
shenqi / exifinfo.sh
Created March 8, 2012 17:37
Change Exif Info for films scanned
function exif_film_lx(){
foreach _file ($@)
echo 'Processing '${_file}
local _date
_date="$(exiftool -s3 -IPTC:DateCreated ${_file}) 00:00:00"
exiftool -q -overwrite_original -Make='Pentax' -Model='LX' -XMP-photoshop:DateCreated=${_date} -
IPTC:TimeCreated='00:00:00+00:00' -Exif:DateTimeOriginal=${_date} ${_file}
end
growlnotify -s -a /Applications/iTerm.app "iTerm" -m "Finished rewriting tags"
}
@shenqi
shenqi / skel.html
Created May 10, 2012 17:16
Skel for HTML5
<!DOCTYPE HTML>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>tarorow-shenqi.com</title>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="http://yui.yahooapis.com/3.5.0/build/cssreset/cssreset-min.css" />
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
@shenqi
shenqi / using llvm
Created August 1, 2012 04:03
config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.57. Invocation command line was
$ ./configure --prefix=/usr/local/Cellar/screen/4.00.03 --mandir=/usr/local/Cellar/screen/4.00.03/share/man --infodir=/usr/local/Cellar/screen/4.00.03/share/info --enable-colors256
## --------- ##
## Platform. ##
@shenqi
shenqi / using clang
Created August 1, 2012 04:06
config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.57. Invocation command line was
$ ./configure --prefix=/usr/local/Cellar/screen/4.00.03 --mandir=/usr/local/Cellar/screen/4.00.03/share/man --infodir=/usr/local/Cellar/screen/4.00.03/share/info --enable-colors256
## --------- ##
## Platform. ##
#!/usr/bin/env zsh
if ! test -e /Applications/Xcode.app/; then
echo -e "\e[33;1mNeeds Xcode installed. Aborting...\e[m";
open 'macappstore://itunes.apple.com/jp/app/xcode/id497799835?mt=12' && exit 1
fi
function check_n_install(){
local com2 com3
if ! test -x $(/usr/bin/which $1); then
echo -e "\e[36mInstalling $1...\e[m"
@shenqi
shenqi / ggplot2_lm.R
Last active August 29, 2015 14:01
Extension of ggplot2 to work friendly with lm object
library(ggplot2)
require(ggplot2)
# usage
#
# stat_r2(lm_obj, x, y, adjusted = FALSE, digits=NULL, ...)
# lm_obj lm object given by lm()
# x, y positional coordinate of r2 value
# adjusted use adjusted R2 instead
# digits see format()