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
<?php | |
// | |
// 複数のExcel Workbooks を 1つに結合 | |
// combine excel Workbooks | |
// (merge excel Worksheets to one Workbooks) | |
// | |
// 結合元のexcelファイル名列 | |
$org_books = array('sample1.xls', 'sample2.xls', 'sample3.xls'); | |
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 | |
for i in `/bin/ls *.jpg` | |
do | |
FILE=$i | |
GEOM=`identify $FILE | awk '{print $3}'` | |
WIDTH=`echo $GEOM| awk -Fx '{print $1}'` | |
HEIGHT=`echo $GEOM| awk -Fx '{print $2}'` | |
C_WIDTH=`expr $WIDTH + 5` |
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 | |
# | |
# yahoo weather | |
# | |
# weather image | |
URL=`curl --silent "http://weather.yahoo.com/japan/tokyo-prefecture/tokyo-1118370/" | \ | |
grep background:url | sed -e "s/.*background:url('//" -e 's/png.*/png/' | grep -v partner-logo` | |
curl --silent -o /tmp/weather.png $URL |
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 | |
# | |
# yahoo weather | |
# | |
# weather text | |
TEXT_INFO=`curl --silent "http://xml.weather.yahoo.com/forecastrss?p=JAXX0085&u=c" | grep yweather:conditio ` | |
TEXT=`echo $TEXT_INFO | sed -e 's/.*text="//' -e 's/".*//'` | |
TEMP=`echo $TEXT_INFO | sed -e 's/.*temp="//' -e 's/".*//'` | |
TEMP=`expr $TEMP - 50` |
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 time | |
import RPi.GPIO as GPIO | |
# GPIO setup | |
GPIO.setmode(GPIO.BCM) | |
# GPIO4(PIN7) setup for output | |
GPIO.setup(4, GPIO.OUT) | |
# 1sec on and 0.5sec 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
import time | |
import RPi.GPIO as GPIO | |
# GPIO setup | |
GPIO.setmode(GPIO.BCM) | |
# GPIO11(PIN23) setup for output | |
GPIO.setup(11, GPIO.IN) | |
# default status switch off(False) |
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 | |
# -*- coding: utf-8 -*- | |
import socket | |
import sys | |
def hostip(hostname): | |
try: | |
print socket.gethostbyname(hostname) |
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 | |
domain=sample.com | |
maildir_path=/var/vhosts | |
new_user=$1 | |
password=$2 | |
if [ "$password" = "" ]; then | |
echo Usage: $0 user password |
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 | |
domain=sample.com | |
new_user=$1 | |
password=$2 | |
if [ "$password" = "" ]; then | |
echo Usage: $0 user password | |
exit 1 |
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
Bleacon = require('bleacon'); | |
Bleacon.startScanning(); | |
Bleacon.on('discover', function(bleacon) { | |
console.dir(bleacon); | |
}); |
OlderNewer