Skip to content

Instantly share code, notes, and snippets.

View ryugoo's full-sized avatar

Ryutaro Miyashita ryugoo

View GitHub Profile
@ryugoo
ryugoo / app.coffee
Created November 9, 2012 03:03
シングルコンテキストでウィンドウを開く
# Application global object
apps = apps or {}
# Entry point
do ->
# Window
win1 = require("win1").init(apps);
# Tab
tab = Ti.UI.createTab
icon: "KS_nav_ui.png"
@ryugoo
ryugoo / app.js
Created November 16, 2012 05:06
HTTPClient send boolean values.
(function () {
var win = Ti.UI.createWindow({
title: "Window",
backgroundColor: "#FFFFFF"
}),
tableView = Ti.UI.createTableView({
data: []
}),
http = Ti.Network.createHTTPClient();
win.add(tableView);
@ryugoo
ryugoo / app.coffee
Created December 3, 2012 15:50
TiPlatformConnect with Pocket
do (Ti) ->
# Load CommonJS modules
pocket = require("pocket").Pocket
consumerKey: "" # PLEASE GET CONSUMER KEY at http://getpocket.com/developer/
accessTokenKey: Ti.App.Properties.getString "pocketAccessTokenKey", ""
pocketUserName: Ti.App.Properties.getString "pocketUserName", ""
# Build user interface component
win = Ti.UI.createWindow
backgroundColor: "#FFFFFF"
@ryugoo
ryugoo / test_keyword_args.rb
Created January 16, 2013 16:50
Ruby 2.0.0 keyword arguments test
def p1(*args, **kwargs)
print args
print "\n"
print kwargs
end
p1
#=> []
#=> {}
@ryugoo
ryugoo / stylus.jmk.js
Last active December 11, 2015 17:49
Stylus to Alloy JMK
var fs = require("fs");
var path = require("path");
var util = require("util");
var styl = require("stylus");
var wrench = require("wrench");
function compileTSS(root, view) {
var data = fs.readFileSync(path.join(root, view), "utf8"),
tss;
styl.render(data, function (err, css) {
@ryugoo
ryugoo / app.js
Created January 27, 2013 07:03
Titanium 2.1.1.GA isArray check
/*jslint devel: true */
/*global Titanium, require */
(function (Ti, require) {
"use strict";
// モジュール
var style = require("style"),
lib = require("lib"),
// UI コンポーネント
win = Ti.UI.createWindow(style.win),
thisHeadlineLabel = Ti.UI.createLabel(style.headlineLabel),
@ryugoo
ryugoo / ltsv.js
Last active December 12, 2015 07:29 — forked from tomotaka/ltsv.dart
/*jslint devel:true */
/*global window, exports */
(function (root) {
"use strict";
// Prototype extension
if (!Array.prototype.removeAt) {
Array.prototype.removeAt = function (idx) {
if (typeof idx !== "number") {
throw new TypeError("removeAt argument is required Integer");
@ryugoo
ryugoo / build.py
Created February 18, 2013 02:41
Modified TiCordova build.py
#!/usr/bin/env python
#
# Appcelerator Titanium Module Packager
#
#
import os
import subprocess
import sys
import glob
import string
@ryugoo
ryugoo / app.js
Created March 28, 2013 02:46
Titanium Mobile ScrollableView minimal apps sample.
/*jslint devel:true */
/*global Titanium */
(function (Ti) {
"use strict";
var tabGroup, tab, win, sview;
tabGroup = Ti.UI.createTabGroup();
win = Ti.UI.createWindow({
backgroundColor: "#FFFFFF",
title: "Photo Gallery",
tabBarHidden: true
var core, Model, model;
core = Object.create(Backbone.Events);
Model = Backbone.Model.extend();
model = new Model();
core.listenTo(model, 'myEvent', function () {
console.log('Hello, World');
});