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
# 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
# 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
// MapUpdater plugin | |
// 2016.07.18 | |
// @Carotene | |
// Usage: | |
// /updatemap <maps_name> <radius> | |
// /updatemap <maps_name> <radius> <x> <y> <z> | |
// - <maps_name> is just for messaging. | |
// - <radius> is the search range of the maps in item frames. |
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
# === base classes === | |
class OverrideProcessor(object): | |
def __init__(self,target_class): | |
self.method_names = tuple() # names tuple of override method | |
self.target_class = target_class # target class to override methods | |
self.reference_methods = {} # reference methods dict fot override target | |
self.setup() | |
self.do() |
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
# -*- coding: shift-jis -*- | |
# vcs converter | |
# 2015.09.23 | |
# @Carotene | |
# -d : save directory path of the output text file | |
# -i : input vcs file path | |
from argparse import ArgumentParser | |
import os, os.path, datetime, quopri |
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
# twitter multi pictures downloader for Python 2.7 | |
# 2015.07.25 | |
# @Carotene | |
# How to Use: | |
# 1. Copy to clipboard the twitter page url uploaded pictures more than 2. | |
# 2. Run this script with an argument of save directory. | |
from bs4 import BeautifulSoup | |
from argparse import ArgumentParser |