This file contains hidden or 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
// | |
// Export the EAGLE cream layers to DXF for the Craft-ROBO cutting plotter. | |
// | |
// Copyright (c) 2010 Switch Science, Inc. | |
// | |
// Type "run cream-dxf" in the board editor window. | |
// Options: | |
// -o Add one more line segment for pads to make sure the cut. | |
// -c Cut off corners of pads. The resulting pads are octagons. | |
// |
This file contains hidden or 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
#include <LiquidCrystal.h> | |
/* | |
* | |
* Config | |
* | |
*/ | |
#define BUTTON 3 | |
#define HEATER 9 | |
#define SENSOR 10 |
This file contains hidden or 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 xml.sax.handler | |
import xml.sax | |
class Node(object): | |
def __init__(self, name=None, attrs=None): | |
self.name_ = name | |
self.attrs_ = attrs | |
self.dict_ = {} | |
self.str_ = '' |
This file contains hidden or 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
#vim:fileencoding=utf-8 | |
# | |
# 古いMP3エンコードソフトを使った時、 | |
# ID3タグにSJIS文字列が入っているのを修正する。 | |
# | |
# エンコーディングがLatin-1なのにSJISらしき物を修正。 | |
# | |
# 2011-3-31 Shigeru KANEMOTO | |
# Public Domain | |
# |
This file contains hidden or 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
# by sgk | |
import datetime | |
class TZ(datetime.tzinfo): | |
def __init__(self, name, offset): | |
self.name_ = name | |
self.offset_ = offset | |
def utcoffset(self, dt): | |
return datetime.timedelta(hours=self.offset_) |
This file contains hidden or 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 | |
# vim:set fileencoding=utf-8 sw=2 ai: | |
import sqlite3 | |
import datetime | |
import re | |
SQL = ''' | |
select | |
name, version, time, author, text |
This file contains hidden or 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
<? | |
# Add following line in ".htaccess". | |
# php_value auto_prepend_file compat.php | |
$HTTP_SERVER_VARS = $_SERVER; | |
$HTTP_COOKIE_VARS = $_COOKIE; | |
$HTTP_POST_VARS = $_POST; | |
$HTTP_GET_VARS = $_GET; |
This file contains hidden or 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
/* | |
* by Shigeru KANEMOTO at SWITCHSCIENCE. | |
*/ | |
import java.io.File; | |
import java.io.IOException; | |
class RelativePath { | |
// | |
// Compute relative path to "target" from a directory "origin". |
This file contains hidden or 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 | |
export PATH=/usr/sbin:/sbin:$PATH | |
export TZ=Asia/Tokyo | |
export LANG=en | |
SERVERHOST=mybackupserver.example.com | |
SERVERLOGIN=mybackup | |
SERVER="$SERVERLOGIN@$SERVERHOST" | |
WEEKDAY=$(date +%a) |
This file contains hidden or 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 socket | |
def whois(host, query): | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.connect((host, 43)) | |
sock.send(query + '\r\n'); | |
text = '' | |
while True: | |
t = sock.recv(1024) | |
if not t: |
OlderNewer