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
require 'aws-sdk-core' | |
require 'aws-sdk-resources' | |
require 'yaml' | |
config = YAML.load_file('config.yml')[:tag] | |
Aws.config.update( | |
region: 'ap-northeast-1', | |
credentials: Aws::Credentials.new(config[:access_key_id], config[:secret_access_key]) | |
) |
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
framework 'IOBluetooth' | |
class A | |
def initialize | |
@c = CBCentralManager.alloc.initWithDelegate(self, queue:nil) | |
end | |
def centralManagerDidUpdateState(central) | |
if central.state == CBCentralManagerStatePoweredOn | |
@c.scanForPeripheralsWithServices(nil, options:nil) |
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 IOBluetooth | |
class A: NSObject, CBCentralManagerDelegate { | |
var c: CBCentralManager! | |
init() { | |
super.init() | |
c = CBCentralManager(delegate:self, queue:nil) | |
} |
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
❗️❗️❗️❗️❗️❗️ |
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
<match fluent.digraph fluent.warn> | |
type websocket | |
port 8080 | |
</match> | |
... |
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
request = require 'request' | |
http = require 'http' | |
url = require 'url' | |
cp = require 'child_process' | |
command = (command, args, callback) -> | |
cmd = cp.spawn command, args | |
if callback | |
result = new Buffer(0) |
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/env ruby | |
# -*- coding: UTF-8 -*-; | |
require 'base64' | |
require 'pathname' | |
require 'english' | |
require 'json' | |
require 'CFPropertyList' |
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
# $ coffee fluent-dump.coffee [bind] [port] | |
net = require 'net' | |
dns = require 'dns' | |
util = require 'util' | |
dgram = require 'dgram' | |
msgpack = require 'msgpack' | |
msgpack.raw = require 'msgpack-raw' |
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 sys | |
import math | |
from random import random | |
from PIL import Image, ImageOps, ImageEnhance | |
def dot(bits): | |
bits = bits & 7 | (bits & 112) >> 1 | (bits & 8) << 3 | bits & 128 | |
return unichr(0x2800 + bits) | |
class Grayscale24: |
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 sys | |
import math | |
def dot(bits): | |
bits = bits & 7 | (bits & 112) >> 1 | (bits & 8) << 3 | bits & 128 | |
return unichr(0x2800 + bits) | |
def mandelbrot(x, y, r, iteration=1000): | |
xx = 1.4 * float(x - 1.4 * r) / r | |
yy = 1.4 * float(y - r) / r |