2014-02-01
@maaash
| var PORT = 5353; | |
| var MULTICAST_GROUP = "224.0.0.251"; | |
| var dgram = require("dgram"); | |
| var client = dgram.createSocket("udp4"); | |
| var name = "IRKitD2A8"; | |
| // | |
| var payload = new Buffer( |
| #!/usr/bin/env ruby | |
| # -*- encoding: utf-8 -*- | |
| # make complex graphs from graphs with same graph_name prefix | |
| # provide separator, which defaults to '-' | |
| # | |
| # --memo-- | |
| # APIs | |
| # * GET /json/list/graph | |
| # * GET /json/list/complex |
| ### Author: Masakazu Ohtsuka <[email protected]> | |
| class Config(): | |
| def __init__(self): | |
| import ConfigParser | |
| self.conf = ConfigParser.ConfigParser() | |
| import inspect | |
| this_file = inspect.getfile(inspect.currentframe()) | |
| conf_file = this_file + ".conf" |
| #include "Arduino.h" | |
| #include <Servo.h> | |
| Servo servo; | |
| char line[10]; | |
| int line_index; | |
| void setup() { | |
| Serial.begin(9600); |
| package strings | |
| import ( | |
| "fmt" | |
| "unicode/utf8" | |
| ) | |
| func MultibyteToEntityString(in string) string { | |
| ret := "" | |
| for _, c := range in { |
| require 'formula' | |
| # use `brew install --env=std ./ab.rb` | |
| class Ab < Formula | |
| homepage 'http://httpd.apache.org/docs/trunk/programs/ab.html' | |
| url 'http://archive.apache.org/dist/httpd/httpd-2.4.2.tar.bz2' | |
| sha1 '8d391db515edfb6623c0c7c6ce5c1b2e1f7c64c2' | |
| def patches |
| #!/bin/sh | |
| if [ -t 0 ]; then | |
| # not tty | |
| if [ $# -ne 1 ]; then | |
| echo "usage:" | |
| echo " $0 filename" | |
| echo "or" | |
| echo " cat filename|$0" | |
| exit 1 | |
| fi |
| package AnyEvent::APNS::FeedbackService; | |
| use utf8; | |
| use Mouse; | |
| use AnyEvent 4.80; | |
| use AnyEvent::Handle; | |
| use AnyEvent::Socket; | |
| use AnyEvent::TLS; | |
| our $VERSION = '0.01'; |
| package Redis::Custom; | |
| use strict; | |
| use warnings; | |
| # Redis::Custom->setup_custom_command( $redis, 'sjaccardstore', $lua_script, 1 ); | |
| sub setup_custom_command { | |
| my ($package, $redis, $command_name, $lua_script, $key_count, @binded_values) = @_; | |
| my ($sha1) = $redis->script_load( $lua_script ); |