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
import json | |
from jsonschema import ValidationError, exceptions | |
from jsonschema.validators import Draft3Validator | |
from functools import wraps | |
from flask import _request_ctx_stack, request, jsonify | |
def _validate(schema, data): | |
reqv = Draft3Validator(schema) |
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
ipa_base="debug" | |
ipa_ext=".ipa" | |
profile="iOSTeam Provisioning Profile: *" | |
archives="/Users/$USER/Library/Developer/Xcode/Archives/" | |
newest_dir=`ls -lt $archives|head -n 2|tail -n 1|cut -f 13- -d " "` | |
echo $newest_dir | |
newest_ipa=`ls -lt $archives$newest_dir|head -n 2|tail -n 1|cut -f 13- -d " "` |
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
(^o^)/owata |
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 'rubygems' | |
require 'serialport' | |
sp = SerialPort.new("COM6", 9600, 8, 1, SerialPort::NONE) | |
command = ["0D"] | |
sp.write(command.pack("H*")) | |
sp.read | |
sp.read | |
loop { |
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
#define R 5 | |
#define G 6 | |
#define B 7 | |
#define S 2 | |
#define WAIT 500 | |
int inByte = 0; | |
int inSwitch; | |
bool r, g, b, blink, off; |
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
int analogValue = 0; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
analogValue = analogRead(0)/4; | |
Serial.println(analogValue, DEC); | |
delay(100); | |
} |
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 "rubygems" | |
gem "activeresource" | |
require "active_resource" | |
require "serialport" | |
class State < ActiveResource::Base | |
self.site = 'http://cyberia.yuiseki.net/' | |
end | |
#5秒おきにRailsに問い合わせて出力する |
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
_,,....,,_ _人人人人人人人人人人人人人人人_ | |
-''":::::::::::::`''> ゆっくりした結果がこれかよ!!! < | |
ヽ::::::::::::::::::::: ̄^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^ ̄ | |
|::::::;ノ´ ̄\:::::::::::\_,. -‐ァ __ _____ ______ | |
|::::ノ ヽ、ヽr-r'"´ (.__ ,´ _,, '-´ ̄ ̄`-ゝ 、_ イ、 | |
_,.!イ_ _,.ヘーァ'二ハ二ヽ、へ,_7 'r ´ ヽ、ン、 | |
::::::rー''7コ-‐'"´ ; ', `ヽ/`7 ,'==─- -─==', i | |
r-'ァ'"´/ /! ハ ハ ! iヾ_ノ i イ iゝ、イ人レ/_ルヽイ i | | |
!イ´ ,' | /__,.!/ V 、!__ハ ,' ,ゝ レリイi (ヒ_] ヒ_ン ).| .|、i .|| | |
`! !/レi' (ヒ_] ヒ_ン レ'i ノ !Y!"" ,___, "" 「 !ノ i | |
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/local/bin/ruby -Ks | |
# _*_ coding: utf-8 _*_ | |
require 'rubygems' | |
require 'mechanize' | |
require 'time' | |
MAIL = 'mixi_login_mail_address' | |
PASS = 'mixi_login_pass' | |
DIRECTORY = 'log_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
require 'rubygems' | |
require 'sinatra' | |
require 'tokyotyrant' | |
include TokyoTyrant | |
helpers do | |
def get_recents() | |
rdb = RDBTBL::new | |
rdb.open('localhost', 1978) | |
qry = RDBQRY::new(rdb) |
OlderNewer