Skip to content

Instantly share code, notes, and snippets.

class DeepHash < Hash
def initialize
self.default_proc = Proc.new {|hash, key| hash[key] = DeepHash.new}
end
end
if exists('g:loaded_toggle_foldlevel')
finish
endif
let s:original_cpoptions = &cpoptions
set cpoptions&vim
function! s:toggle_foldlevel()
if !exists('s:folded')
let s:folded = 0
#!/usr/bin/ruby19
require 'sequel'
Sequel::Model.plugin :schema
DB = Sequel.sqlite
class Post < Sequel::Model
set_schema do
#!/usr/bin/ruby19
require 'sequel'
Sequel::Model.plugin :schema
DB = Sequel.sqlite
class Post < Sequel::Model
set_schema do
#!/usr/bin/ruby19
# coding: utf-8
require 'mechanize'
hiragana_characters = %w(
あ い う え お
か き く け こ
さ し す せ そ
た ち つ て と
@jakalada
jakalada / appengine_entity.py
Created March 15, 2010 17:47
quote from GAE document - Entity
# ref: http://code.google.com/intl/ja/appengine/docs/python/datastore/entitiesandmodels.html#Properties_and_Types
# reserved attribute names by the Model class
#
# all, app, copy, delete, entity, entity_type
# fields, from_entity, get, gql, instance_properties
# is_saved, key, key_name, kind, parent, parent_key
# properties, put, setdefault, to_xml, update
# --------------
@jakalada
jakalada / appengine_model.py
Created March 15, 2010 16:57
quote from GAE document - Model
# ref: http://code.google.com/intl/ja/appengine/docs/python/datastore/entitiesandmodels.html
# -----
# Model
# ref: http://code.google.com/intl/ja/appengine/docs/python/datastore/modelclass.html
# -----
from google.appengine.ext import db
class Pet(db.Model):
class Storage
constructor: ->
@init()
init: ->
@table = {}
@keys = []
@length = 0
clear: ->
require 'serialport'
port = "/dev/ttyAMA0"
bps = 115200
class ESP8266
def initialize(port, bps)
@serial_port = SerialPort.new(port, bps)
end
@jakalada
jakalada / file0.txt
Created March 29, 2016 16:44
Raspberry Pi 3とGenuino (Arduino) 101でBLE通信する ref: http://qiita.com/jakalada/items/7ad4144efa2f5e109b89
peripheral discovered (xxxxxxxxxxxx with address <xx:xx:xx:xx:xx:xx, public>, connectable true, RSSI -68:
hello my local name is:
ButtonLE
can I interest you in any of the following advertised services:
["19b10010e8f2537e4f6cd104768a1214"]