Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
#coding: utf8
import sys, re, cgi, urllib, urllib2, cookielib, xml.dom.minidom, time, netrc
import json
#netrc
netrc = netrc.netrc()
l,a,p = netrc.authenticators("nicovideo")
#login info
!urxvt.font: xft:Bitstream Vera Sans Mono-8.5
urxvt*shading: 20
urxvt*inheritPixmap: True
urxvt.background: black
urxvt.foreground: white
urxvt*scrollBar: true
urxvt*scrollBar_floating: true
urxvt*scrollBar_right: true
urxvt*scrollColor: #202020
urxvt*termName: xterm
#! /bin/sh
export EXTERNAL_STORAGE=/mnt/storage
PYTHONPATH=/mnt/storage/com.googlecode.pythonforandroid/extras/python
PYTHONPATH=${PYTHONPATH}:/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynload
export PYTHONPATH
export TEMP=/mnt/storage/com.googlecode.pythonforandroid/extras/python/tmp
export PYTHON_EGG_CACHE=$TEMP
export PYTHONHOME=/data/data/com.googlecode.pythonforandroid/files/python
export LD_LIBRARY_PATH=/data/data/com.googlecode.pythonforandroid/files/python/lib
#https://github.com/Wildog/Python-for-Android-Shell
export EXTERNAL_STORAGE=/mnt/sdcard
PYTHONPATH=/mnt/sdcard/com.googlecode.pythonforandroid/extras/python
PYTHONPATH=${PYTHONPATH}:/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynload
export PYTHONPATH
export TEMP=/mnt/sdcard/com.googlecode.pythonforandroid/extras/python/tmp
#!/system/bin/bash
# https://code.google.com/p/android-python27/wiki/TutorialHowToRunPythonfromShell
export PYTHONHOME=/data/data/com.android.python27/files/python
export PYTHONPATH=/sdcard/com.android.python27/extras/python:/data/data/com.android.python27/files/python/lib/python2.7/lib-dynload:/data/data/com.android.python27/files/python/lib/python2.7
export PATH=$PYTHONHOME/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/data/com.android.python27/files/python/lib:/data/data/com.android.python27/files/python/lib/python2.7/lib-dynload
export AP_HOST=localhost
export AP_PORT=45777
am start -a com.android.python27.LAUNCH_RPC_SERVER -n com.android.python27/.RpcServerLauncher --ei com.android.python27.RPC_SERVER_PORT 45777
#!/bin/bash
while :
do
var=`echo "
-- AppleScript
-- http://stackoverflow.com/questions/7921378/check-finder-activity
set thestatus to \"0\"
tell application \"System Events\"
set theList to get the title of every window of process \"Finder\"
# PROMPT {{{
setopt prompt_subst
setopt prompt_percent
setopt transient_rprompt
color256()
{
local red=$1; shift
local green=$2; shift
# zsh_prompt {{{
setopt prompt_subst
setopt prompt_percent
setopt transient_rprompt
color256()
{
local red=$1; shift
local green=$2; shift
local blue=$3; shift
#!/bin/bash
if [ $# == 1 ];then
case $1 in
-[hH]|--[hH]elp)
cat << EOF
フォルダ内の一括リネーム
$ rename <type>
#!/bin/zsh
user="syui"
repo=`echo $PWD:t`
repo_j={\"name\":\"$repo\"}
url="https://github.com/"$user/$repo.git
curl -u $user https://api.github.com/user/repos -d $repo_j
case $? in