Skip to content

Instantly share code, notes, and snippets.

View hydrangeas's full-sized avatar

Akira Otaka hydrangeas

  • Freelance
  • Hamamatsu, Japan
View GitHub Profile
@hydrangeas
hydrangeas / column.css
Created March 15, 2012 07:06
テーブルを色々装飾してみる
tr:nth-child(2n+1) {
background-color: #CF9;
}
@hydrangeas
hydrangeas / fiddle.css
Created March 15, 2012 08:18
さいころくるくる
@-webkit-keyframes kurukuru {
0% {
-webkit-transform: translateZ(324.07203952454984px) rotateY(0deg) rotateX(0deg);
}
50% {
-webkit-transform: translateZ(324.07203952454984px) rotateY(180deg) rotateX(0deg);
}
100%{
-webkit-transform: translateZ(324.07203952454984px) rotateY(360deg) rotateX(0deg);
}
@hydrangeas
hydrangeas / gist:2070856
Created March 18, 2012 11:53
Arduino Setup (Ubuntu 10.10)
echo "jdk7である必要はない.ただ使ってみたかっただけ(結局OpenJDK6を入れられてしまう)"
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-jdk7-installer
echo "apt-get arduino{,-core}で必要なものは入るはずだが,Arduino-1.0を使わんがためにわざわざ面倒なことをしている"
cd /tmp
mkdir arduino/
cd arduino/
curl -OL "http://ftp.jaist.ac.jp/pub/Linux/ubuntu//pool/universe/r/rxtx/librxtx-java_2.2pre2-10_i386.deb"
// Reports the frequency from the TSL230, higher number means brighter
// Part: http://www.sparkfun.com/products/8940
// Article: http://bildr.org/2011/08/tsl230r-arduino/
int TSL230_Pin = 4; //TSL230 output
int TSL230_s0 = 3; //TSL230 sensitivity setting 1
int TSL230_s1 = 2; //TSL230 sensitivity setting 2
int TSL230_samples = 6; //higher = slower but more stable and accurate
@hydrangeas
hydrangeas / install-gitlab.sh
Created April 1, 2012 15:23
installing gitlab
sudo su - gitlab
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
source ~/.bashrc
rvm install 1.9.2
logout
sudo su - gitlab
rvm use 1.9.2 --default
gem install sqlite3-ruby
gem install charlock_holmes
gem install bundler
@hydrangeas
hydrangeas / 3d.css
Created April 2, 2012 07:25
2012-04-02
#container{
-webkit-perspective: 200px;
}
#stage{
-webkit-transform-style: preserve-3d;
}
#shape{
-webkit-transform-style: preserve-3d;
}
#panel{
@hydrangeas
hydrangeas / perspective1.css
Created April 2, 2012 10:43
2012-04-02_branch01
#container{
margin: 50px 0 0 200px;
width : 200px;
height: 200px;
display: block;
border: #ccc 1px solid;
position: relative;
-webkit-perspective-origin-x: 100px;
@hydrangeas
hydrangeas / LSM303.c
Created April 10, 2012 23:39
Arduino
/* LSM303DLH Example Code
by: Jim Lindblom
SparkFun Electronics
date: 9/6/11
license: Creative commons share-alike v3.0
Summary:
Show how to calculate level and tilt-compensated heading using
the snazzy LSM303DLH 3-axis magnetometer/3-axis accelerometer.
@hydrangeas
hydrangeas / base64.sh
Created July 17, 2012 23:34
encode base64
for image in *jpg;
do;
base64 < ${image} > ${image}.base64;
done
import sys
import iothub_service_client
from iothub_service_client import IoTHubRegistryManager, IoTHubRegistryManagerAuthMethod
from iothub_service_client import IoTHubDeviceStatus, IoTHubError
### TODO:ここは変える!
CONNECTION_STRING = "<接続文字列>"
DEVICE_ID = "MyFirstPythonDevice"
def print_device_info(title, iothub_device):