Skip to content

Instantly share code, notes, and snippets.

View astronaughts's full-sized avatar
💡
Working from home

Masahiro Ueno astronaughts

💡
Working from home
  • Chatwork
  • Osaka, Japan
View GitHub Profile
@billdawson
billdawson / ex01-filestream-getfile.js
Created May 2, 2011 21:33
Examples - Stream blog post - FileStream
// Get the source file (this one is in Resources).
var infile = Titanium.Filesystem.getFile('emmy.jpg');
if (!infile.exists()) {
Ti.API.error("File not exists()");
return;
}
@hokaccha
hokaccha / app.js
Created November 10, 2011 10:58
express mapRouter
var express = require('express')
, mapRouter = require('./express-mapRouter')
, app = express.createServer()
, routesDir = __dirname + '/routes';
// 'GET /' : 'root:index' はこれと同じ
// var root = require('./routes/root');
// app.get('/', root.index);
var routesMap = {
'GET /' : 'root:index'
@kmizu
kmizu / gist:1876800
Last active December 22, 2019 00:05 — forked from gakuzzzz/gist:1865400
Scala環境構築

Scala 開発環境構築手順

前提条件

  • JDKがinstall済みであること
  • java コマンドに環境変数Pathが通っていること
@rborn
rborn / app.js
Created May 24, 2012 16:34
now.js for Titanium mobile
// put now.js and socket.io.js inside a 'lib' dir inside Resources dir
// (obviously you can change this, only remember to change the require inside now.js line #1)
// just socket.io:
/*
var io = require('/lib/socket.io');
var socket = io.connect('http://192.168.1.129:6120'); // using LAN IP instead of localhost
socket.on('news', function (data) {
Ti.API.log(data);
socket.emit('my other event', { my: 'data' });
@nantekkotai
nantekkotai / gist:2841665
Created May 31, 2012 07:27
Objective-Cで非同期通信を行う

Objective-Cで非同期通信を行なってAPIを叩くなどする場合はどうやるのか。

初期化

まず2つ変数を用意する。

@implementation Hogeee {
    NSMutableData *hogeData;
    NSURLConnection connection;
}
@hiroy
hiroy / PHPでのUTF-8-MAC対応例
Created June 28, 2012 03:42
MacからのファイルアップロードでNFDで正規化された日本語ファイル名をNFCでの正規化にnormalizeするサンプル
<?php
$name = $_FILES['inputname']['name'];
if (Normalizer::isNormalized($name, Normalizer::FORM_D)) {
$_FILES['inputname']['name'] = Normalizer::normalize($name, Normalizer::FORM_C);
}
@jugyo
jugyo / sublime_text_2_plugin_tips.md
Created August 13, 2012 09:54
Sublime Text 2 Plugin Tips

Sublime Text 2 Plugin Tips

API Reference

コマンドの実行はコンソール( ctrl + ` で開ける)で以下を実行する:

view.run_command('example')
@MoOx
MoOx / less2stylus.js
Created August 27, 2012 17:37 — forked from lancejpollard/less2stylus.coffee
Convert LESS to Stylus
// Usage : less2stylusDir('../src/css/');
var fs = require('fs');
// this less 2 stylus conversion script make a stylus easy to read syntax
// - let the braces
// - replace the @ for var as $
// - let semicolons
function less2stylus(less)
@BlackKetchupTea512
BlackKetchupTea512 / sublimetext_default_settings.md
Created September 4, 2012 12:11
Sublime Text 2 のDefault設定ファイルについて

追記

この記事は古いです...。はてなブログの方に完全版を置いてあります。→ http://blue-ham-cake1024.hatenablog.com/entry/2012/09/07/Sublime_Text_2_のDefault設定ファイルを眺める


はてなブログは調子が悪いようなので。

この記事ではDefault設定ファイルにどのような記述がされているか、その記述にどんな意味があるかを一つ一つ見ていきます。実際に設定をカスタマイズしてみたい方は、メニューのPreferencesタブの"Settings - User"からUser設定ファイルを開いてそこでいろいろ試してみましょう。

@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)