Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block KainokiKaede

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
#! python2
# APN file local installer
# Creates local HTTP server to serve APN file.
# Place APN file in the same directory of this script.
# If "address already in use" shown, re-run the script.
# Based on: File Transfer for Pythonista
# File Transfer for Pythonista
# ============================
# This script allows you to transfer Python files from
KainokiKaede /
Created Feb 27, 2014
This is a Pythonista (for iOS) script to obtain short URL of your photo from Flickr photostream. Please download [base58]( module before use.
'''Usage: hold at your favorite photo
and copy the URL, then press Done.
username = 'kainokikaede'
# Download base58 module from here and place it in the same directory:
from base58 import Base58
KainokiKaede / AutoHotkey.ahk
Last active Aug 29, 2015
This is a setting file for AutoHotkey. It changes Numpad 1, 4, 7, and Numlock keys to Option, Shift, Command, and Escape keys, respectively. Also, it disables non-numeric functions of a numpad.
View AutoHotkey.ahk
; KainokiKaede's settings:
; Prevent Enter from being taken by plugins.
KainokiKaede / private.xml
Created Feb 11, 2014
This is a private setting file for KeyRemap4MacBook. It changes Numpad 1, 4, 7, and Numlock keys to Option, Shift, Command, and Escape keys, respectively.
View private.xml
<?xml version="1.0"?>
<name>KainokiKaede Original Settings</name>
<name>Place Modifiers to Numpad</name>
<appendix>Numpad 1 to Option (KeyToKey)</appendix>
<appendix>Numpad 4 to Shift (KeyToKey)</appendix>
KainokiKaede / sustain_pedal.pde
Created Nov 27, 2013
Sustain pedal to MIDI: Using Arduino with MIDI shield.
View sustain_pedal.pde
#include <MIDI.h>
// MIDI shield configuration
#define KNOB1 0
#define KNOB2 1
#define BUTTON1 2
#define BUTTON2 3
#define BUTTON3 4
#define STAT1 7 // Status LED
KainokiKaede /
Last active May 5, 2018
These scripts fetch storyline from Moves ( and convert it into gpx file. does the first task, and does the second. To execute, you have to sign in to Moves as a developer ( For further instruction, please read the comments and the code itself. F…
1. Go to and register a new app.
client_id and client_secret will be given, so paste it to the variables below.
2. `$ python --requesturl` will open the web browser.
Follow the instructions and authenticate the app.
You will be redirected to a web page with an error message.
Copy the string between `code=` and `&`.
That is your request_token, so paste it below.
3. `$ python --accesstoken` will output access token to stdout.
Copy the token and paste it below.
KainokiKaede /
Last active Jan 1, 2018
This script converts JSON file obtained from Moves Export service into gpx files.
This is a simple code to convert Moves JSON file to gpx files.
Each day in JSON file will be converted into different gpx file,
one file for a single day.
If you think this behavior annoying, please feel free to rewrite the code:D
Usage: 1. Get JSON file from:
2. The file you've got may have some errors to be a valid JSON file,
so do some surgery to the file.
I did `s/,\+/,/g` in Vim to delete successive commas,
# Inspired by from:
# Using "Approach 3" written in the website, but there are two changes.
# 1. Type one command and you are done. For current dir: $ .
# I'm pretty sure you don't want do this at $HOME, so handle with care!
# 2. Use ctags in directory. Do not use the Mac default. It sucks.
# Please do not forget to chmod +x
CMDNAME=`basename $0`
KainokiKaede / PukiWikiArrayToTeXTabular
Created Nov 30, 2012
Converts PukiWiki style array to TeX tabular environment. Function of this script is quite limited.
View PukiWikiArrayToTeXTabular
import StringIO
class PukiWikiArrayToTeXTabular():
"""Converts PukiWiki style array to TeX tabular environment."""
def __init__(self, pukiwikiarray_string):
"""Receives PukiWiki Style array."""
self.default_align = 'c'
self.pukiwikiarray_string = pukiwikiarray_string
self.converted_string = self.converter()
You can’t perform that action at this time.