conf_file = "../settings.ini"
config = configparser.ConfigParser()
try:
config.read(conf_file)
cron の実行時にカレントディレクトリをスクリプトの場所に変更してはくれないため .. が期待とは違う場所になる
var http = require("http"); | |
var port; | |
if (process.argv.length < 3) { | |
port = 8192; | |
} else { | |
port = process.argv[2]; | |
} | |
http.createServer(function(requset, response) { |
var nc=require('ncurses'); | |
function pad(num) { | |
num = ''+num; | |
var digits = num.length; | |
if (digits < 3) num = '0' + num; | |
if (digits < 2) num = '0' + num; | |
return num; | |
} |
// helloN.js | |
var c = require('ncurses'), | |
w = new c.Window(), | |
pairnum = 1, | |
msg = 'Hello. Press any key. !!!', | |
attr; | |
attr |= c.attrs.REVERSE; | |
attr |= c.attrs.BOLD; | |
attr |= c.attrs.UNDERLINE; |
#!/usr/bin/perl -w | |
use IO::Socket; | |
use Net::hostent; # for OO version of gethostbyaddr | |
$PORT = 9000; # pick something not in use | |
$server = IO::Socket::INET->new( Proto => 'tcp', | |
LocalPort => $PORT, | |
Listen => SOMAXCONN, | |
Reuse => 1); |
<?php | |
$url = 'http://api.justyo.co/check_username/'; | |
$data = array('api_token' => '********KEY*********', 'username' => '*****'); | |
$options = array( | |
'http' => array( | |
'header' => "Content-type: application/x-www-form-urlencoded\r\n", | |
'method' => 'GET', | |
'content' => http_build_query($data), | |
), |
BoldAsFont=yes | |
FontHeight=14 | |
Columns=80 | |
Rows=40 | |
Locale=ja_JP | |
Charset=UTF-8 | |
FontSmoothing=default | |
BoldAsColour=yes | |
AllowBlinking=yes | |
Font=Consolas |
#!/bin/sh | |
# Disable tap on touchpad | |
synclient TapButton1=0 | |
synclient TapButton2=0 | |
synclient TapButton3=0 |
var fs = require('fs'); | |
fs.readdir( process.argv[2], function (err, files) { | |
if (!err) | |
console.log(files); | |
else | |
throw err; | |
}); | |
console.log("Fired callback."); |
最近趣味で触ってみたいなと思ったクールなテクノロジ
Allwinner A64 低価格向け ARM の SoC で、GPU も Mali-400 でとても性能バランスが良い。 http://eetimes.jp/ee/articles/1704/10/news018_2.html
龍芯3号 MIPS インストラクションセットの CPU で、x86 と ARM のインストラクションも動くという変態 http://pc.watch.impress.co.jp/docs/topic/feature/1048911.html