Skip to content

Instantly share code, notes, and snippets.

KainokiKaede

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
@KainokiKaede
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"?>
<root>
<item>
<name>KainokiKaede Original Settings</name>
<item>
<name>DTM</name>
<item>
<name>Place Modifiers to Numpad</name>
<appendix>Numpad 1 to Option (KeyToKey)</appendix>
<appendix>Numpad 4 to Shift (KeyToKey)</appendix>
@KainokiKaede
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:
NumLock::Escape
Numpad1::LAlt
Numpad4::LShift
Numpad7::LControl
; Prevent Enter from being taken by plugins.
NumpadEnter::Space
NumpadIns::Numpad0
@KainokiKaede
KainokiKaede / flickrshortenurl.py
Created Feb 27, 2014
This is a Pythonista (for iOS) script to obtain short URL of your photo from Flickr photostream. Please download [base58](https://gist.github.com/mursts/2247355) module before use.
View flickrshortenurl.py
'''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:
# https://gist.github.com/mursts/2247355
from base58 import Base58
@KainokiKaede
KainokiKaede / AAPickerUI.py
Created Jun 16, 2014
Ascii Art Picker for Pythonista for iOS
View AAPickerUI.py
# coding: utf-8
import ui
import clipboard
from console import hud_alert
aa_list = ["٩( 'ω' )و",
'₍₍⁽⁽(ી(◔‿ゝ◔)ʃ)₎₎⁾⁾',
'(◔‸◔ )',
@KainokiKaede
KainokiKaede / Heartbeat.py
Created Jun 17, 2014
Heartbeat Analyzer for Pythonista for iOS.
View Heartbeat.py
# coding: utf-8
import ui
import time
tapped_time = []
def calc_bpm():
# I decided not to use the first and the last time measurement.
# So the list must have at least 4 items to calculate BPM.
View DropboxSync.py
import os
import sys
import pickle
import console
import editor
import dropboxlogin # this code can be found here https://gist.github.com/4034526
STATE_FILE = '.dropbox_state'
@KainokiKaede
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()
View dirtags_mac.sh
#!/bin/sh
# Inspired by dirtags.sh from: http://ctags.sourceforge.net/faq.html#15
# Using "Approach 3" written in the website, but there are two changes.
# 1. Type one command and you are done. For current dir: $ dirtags_mac.sh .
# I'm pretty sure you don't want do this at $HOME, so handle with care!
# 2. Use ctags in MacVim.app directory. Do not use the Mac default. It sucks.
# Please do not forget to chmod +x
CMDNAME=`basename $0`
@KainokiKaede
KainokiKaede / sustain_pedal.pde
Created Nov 27, 2013
Sustain pedal to MIDI: Using Arduino with MIDI shield.
View sustain_pedal.pde
#include <MIDI.h>
// http://playground.arduino.cc/Main/MIDILibrary
// MIDI shield configuration
#define KNOB1 0
#define KNOB2 1
#define BUTTON1 2
#define BUTTON2 3
#define BUTTON3 4
#define STAT1 7 // Status LED
@KainokiKaede
KainokiKaede / AnkiMarkdown.py
Created Nov 17, 2016
Markdown - Anki viewer for Pythonista. Obtains a Markdown file from Dropbox, hides *em* and **strong** characters, and reveals when they are pressed. Great for remembering something.
View AnkiMarkdown.py
import editor
import markdown2
from bs4 import BeautifulSoup
import tempfile
import webbrowser
import os
# filename = editor.get_path()
filename = os.path.join(tempfile.gettempdir(),'fi.md')
You can’t perform that action at this time.