Skip to content

Instantly share code, notes, and snippets.

@kishikawakatsumi
kishikawakatsumi / Rakefile
Last active August 29, 2015 13:56
Rakefile for testing, building and uploading to Testflight/Crittercism
require "rubygems/version"
require "rake/clean"
require "date"
require 'time'
require "json"
require "open3"
# Application info
APP_NAME = "Ubiregi2"
SDK = "iphoneos"
@nariyu
nariyu / EventEmitter.js
Last active August 29, 2015 14:21
EventEmitter (ES6)
'use strict';
// イベントリスナーの入れ物
let listenerMap = new Map;
/**
EventEmitter クラス
*/
@func09
func09 / Ti.UI.ImageView#imageWithCache
Created April 20, 2011 10:37
TitaniumのImageViewでリモートURLの画像を永続的にキャッシュする
$$$ = {};
$$$.ui = {};
$$$.ui.createImageView = function(options){
var ui = Ti.UI.createImageView(options);
// 画像を永続化してキャッシュ
ui.imageWithCache = function(url){
url = url.replace(/\?[0-9]+$/,'');
@norio
norio / gist:1168521
Created August 24, 2011 16:51
SCSS変更→CSS生成→LiveReloadでCSS反映自動化
# Chromeの最新Dev版にLiveReloadをインストール
# Chromeの拡張機能管理画面でLiveReloadの「ファイルの URL へのアクセスを許可する」にチェックを入れておく
# ターミナルでguard関係のセットアップ
$ gem install rb-fsevent
$ gem install em-websocket
$ gem install guard
$ gem install guard-livereload
$ gem install guard-sass
@astronaughts
astronaughts / app.js
Created December 19, 2011 15:14
Baruth vol.1
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var tabGroup = Titanium.UI.createTabGroup();
var win = Titanium.UI.createWindow();
win.hideTabBar();
win.navBarHidden = true;
var tab = Titanium.UI.createTab({window: win});
var Z_INDEX_TOP = 3;
var Z_INDEX_BOTTOM = 0;
@Chris2048
Chris2048 / flask sse
Last active October 10, 2015 10:58
Server-Side Events in flask
#!/bin/python2.7
# -`*- coding: utf-8 -*-
"""
test for Server-Side events in flask
inspiration from:
http://www.html5rocks.com/en/tutorials/eventsource/basics/
https://github.com/niwibe/sse.git
https://github.com/niwibe/django-sse.git
@ounziw
ounziw / login
Created November 7, 2012 00:45
Test WordPress login from FuelPHP
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<title>Test Suite</title>
</head>
<body>
<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody>
<tr><td><b>Test Suite</b></td></tr>

msgpackの変更案について-3

概要:

  • 現行のRaw型をString型として読み替える。
    • 現行の FixRaw, raw 16, raw 32 は、FixString, string 16, string 32 になる
  • Binary型を新設する。
  • バイト列はBinary型で保存する。そうでなければString型で保存する。

背景

@bash0C7
bash0C7 / gist:5425124
Last active July 28, 2017 01:32
Twilio ワン切りサンプル
require 'twilio-ruby'
#twilio account
twilio_account_sid = 'XXXXXX'
auth_token = 'XXXXXX'
from_number = '+81XXXXX' #コール元(twilioの電話番号)
to_number = '+81XXXXX' #コール先
url = 'http://example.com' #通話を接続する時に使う完全修飾 URL です。 着信通話を処理するために、電話番号に URL をセットするのと同じです。 詳細は、後述の URL パラメーター のセクションを参照してください。 https://jp.twilio.com/docs/api/rest/making-calls
@abackstrom
abackstrom / Makefile
Created November 2, 2010 09:45
CSS and JavaScript Minification/Compression Makefile
#
# css/js minification/compression makefile
#
#
# JS_TARGETS -- js files to minify/gzip
# CSS_TARGETS -- css files to minify/gzip
# CLEANUP -- additional files to delete during "make clean"
#