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
#!/bin/sh | |
if [ $# -lt 1 ]; then | |
echo "Usage: $0 <aar_file> [<output_path>]" 1>&2 | |
exit 1 | |
fi | |
unzip $1 -d /tmp/aar2jar > /dev/null | |
if [ -z "$2" ]; then | |
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
begin remote | |
name aircon | |
flags RAW_CODES | |
eps 30 | |
aeps 100 | |
gap 200000 | |
toggle_bit_mask 0x0 | |
begin raw_codes |
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/python | |
import sys | |
import Adafruit_DHT | |
from datetime import datetime | |
sensor = Adafruit_DHT.AM2302 | |
pin = 17 | |
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin) | |
time = datetime.now().strftime('%s') |
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
#!/bin/bash | |
# ref: https://github.com/ymyzk/mackerel-plugins/blob/master/raspberrypi/temp.sh | |
SECONDS=`date '+%s'` | |
NAME='temperature.cpu' | |
TEMP=`cat /sys/class/thermal/thermal_zone0/temp` | |
VALUE=`echo "scale=3; ${TEMP} / 1000" | bc` | |
echo -e "${NAME}\t${VALUE}\t${SECONDS}" |
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
# Anonymous;Code | |
# http://anonymouscode.jp/ | |
%w(49 6E 74 68 69 73 70 6C 61 63 65 69 6E 79 6F 75 72 6C 69 66 65 2C 6E 6F 65 71 75 61 6C 74 6F 74 68 65 6D 69 72 61 63 6C 65 74 68 61 74 77 61 73 61 72 72 69 76 65 64 61 74 74 68 69 73 73 61 76 65 70 6F 69 6E 74 2C 61 6E 64 49 61 6D 64 65 6C 69 67 68 74 65 64 6D 6F 72 65 74 68 61 6E 61 6E 79 74 68 69 6E 67 65 6C 73 65 2E 47 6F 74 68 72 6F 75 67 68 74 68 65 63 75 72 74 61 69 6E 6F 66 74 68 65 73 74 61 67 65 2C 61 6E 64 68 65 70 65 65 6C 65 64 6F 66 66 74 68 65 6D 61 73 6B 6F 66 73 74 72 69 6E 67 79 77 69 74 63 68 2E 57 6F 72 6C 64 6C 61 79 65 72 63 6C 6F 73 65 74 68 65 6C 6F 6F 70 2E 52 65 67 61 72 64 6C 65 73 73 68 61 63 6B 69 6E 67 47 6F 64 2E).each { |c| print c.to_i(16).chr + " " } |
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
while true do | |
p "Hoooooooot" | |
end |
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
require "sinatra" | |
require "cinch" | |
require "yaml" | |
require "json" | |
config_file = ARGV.shift || "config.yml" | |
if not File.exist? config_file | |
puts "error: Can't find config file #{config_file}" | |
exit | |
end |
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
// jQuery版に書き換えた | |
(function($){ | |
var queries = (function(){ | |
var s = location.search.replace("?", ""), | |
query = {}, | |
queries = search.split("&"), | |
i = 0; | |
if(!s) return null; | |
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
function el-on { | |
for SCRIPT in $@ | |
do | |
if [ ! -e ~/.emacs.d/inits-available/$SCRIPT.el ]; then | |
echo "$SCRIPT.el is not found"; | |
else | |
rm -rf ~/.emacs.d/inits-enable/$SCRIPT.el ~/.emacs.d/inits-enable/$SCRIPT.elc | |
ln -s ~/.emacs.d/inits-available/$SCRIPT.el ~/.emacs.d/inits-enable/$SCRIPT.el | |
fi | |
done |
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
# エンコード | |
echo '件名' | nkf -jM | |
# デコード | |
echo '=?ISO-2022-JP?B?GyRCN29MPhsoQg==?=' | nkf -w - |
NewerOlder