This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mc chat speaker | |
# 2016.06.21 | |
# @Carotene | |
import time, os, re, codecs, winsound | |
from voicetext import VoiceText | |
latest_log = os.getenv('appdata').replace('\\','/') + '/.minecraft/logs/latest.log' | |
VT_API_KEY = 'YOUR_API_KEY' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: shift-jis -*- | |
# vnt converter | |
# 2015.09.28 | |
# @Carotene | |
from argparse import ArgumentParser | |
import os, os.path, datetime, quopri | |
# -d : date format (US/UK/JP) | |
# -i : input vnt file path or input directory path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fluentd plugin - out new_tag | |
# 2016.07.06 | |
# @Carotene | |
class Fluent::NewTagFilterOutput < Fluent::Output | |
Fluent::Plugin.register_output('new_tag', self) | |
config_param :tag, :string, :default => '' | |
def emit(tag, es, chain) | |
es.each {|time,record| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mario.coffee for CoffeeCollider | |
# 2015.09.20 | |
# @Carotene | |
master_gain = 0.5 | |
syn = SynthDef (tone, gain=1.0, dur="bpm190 l16")-> | |
Out.ar(0, Pan2.ar(Pulse.ar(XLine.kr(tone.midicps(), 100, 100)) * Line.kr(0.25, 0, dur:dur, doneAction:2) * gain * master_gain, 0)) | |
.send() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change repository location for japan | |
sudo sed -i.bak -e "s%http://us.archive.ubuntu.com/ubuntu/%http://ftp.jaist.ac.jp/pub/Linux/ubuntu/%g" /etc/apt/sources.list | |
sudo sed -i.bak -e "s%http://ja.archive.ubuntu.com/ubuntu/%http://ftp.jaist.ac.jp/pub/Linux/ubuntu/%g" /etc/apt/sources.list | |
sudo sed -i.bak -e "s%http://archive.ubuntu.com/ubuntu/%http://ftp.jaist.ac.jp/pub/Linux/ubuntu/%g" /etc/apt/sources.list | |
sudo apt update | |
# install dependencies | |
sudo apt install build-essential | |
sudo apt install zlib1g-dev libssl-dev libsqlite3-dev \ | |
libbz2-dev libncurses5-dev libgdbm-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Install Pebble face from Termux | |
Requires: | |
- libpebble2 | |
Usage: | |
python2 install_pebble_face.py <pbw path> | |
""" | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Install Pebble SDK for Ubuntu 64bit (2020) | |
# | |
# switch to python2 | |
# install dependencies for sdk | |
mkdir $HOME/pebble-dev | |
cd $HOME/pebble-dev | |
if [ -x "$(command -v pyenv)" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
dump UPnP actions | |
Requirements: | |
- upnpclient | |
- pyyaml | |
- click | |
Usage: | |
python dump_upnp_actions.py -d <output_dir> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git clone https://github.com/walterschell/tflight4.git | |
cd tflight4 | |
make | |
sudo cp hid-tflight4.ko /lib/modules/$(shell uname -r)/kernel/drivers/hid/ | |
sudo insmod /lib/modules/$(shell uname -r)/kernel/drivers/hid/hid-tflight4.ko |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Required: Python 2.7, git | |
# prepare venv | |
python2 -m pip install virtualenv | |
python2 -m virtualenv venv | |
. venv/bin/activate | |
# prepare required modules | |
pip install cython==0.20 numpy==1.9.0 |