View delete_lf_comment.py
# coding: utf-8
import tokenize
import StringIO
code = u"""
"""
g = tokenize.generate_tokens(StringIO.StringIO(code).readline)
lines = []
View fzf_docker_yml.sh
function parse_yaml () {
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}
if (length($3) > 0) {
vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("___")}
View show_create_table.py
#!/usr/bin/env python
# sqlalchemy
# https://github.com/zzzeek/sqlalchemy
# sqlalchemy engine
# http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html
# reflection
# http://docs.sqlalchemy.org/en/latest/core/reflection.html
View download_book_list_button.js
setTimeout(function(){
var $button =
$('<div id="__download_button" style="' +
' position: fixed;' +
' top: 5px;' +
' right: 200px;' +
' border-radius: 5px;' +
' background: gray;' +
' padding: 8px;' +
' border-top: 1px white solid;' +
View set_up_docker_machine.md
View scrape_shiftjis_page.go
package main
import (
"fmt"
"io"
"net/http"
gq "github.com/PuerkitoBio/goquery"
"golang.org/x/text/encoding/japanese"
"golang.org/x/text/transform"
View upload_ipa.sh
_usage() {
cat << _USAGE_
usage: upload_ipa <config_json> <version>
This program depends on the following commands
jq
ipa (shenzhen)
and needs config.json like this.
{
View resize_with_imagick.go
package main
import "github.com/gographics/imagick/imagick"
func main() {
imagick.Initialize()
defer imagick.Terminate()
mw := imagick.NewMagickWand()
defer mw.Destroy()
View XMPPFramework.podspec.json
{
"name": "XMPPFramework",
"version": "3.6.4",
"platforms": {
"ios": "5.0",
"osx": "10.7"
},
"license": {
"type": "BSD",
"file": "copying.txt"
View delete_same_app_icon.sh
cd /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support
./lsregister -kill -r -domain system -domain local -domain user
# 上記の2つのコマンドを叩いたら Finderを再起動する