Skip to content

Instantly share code, notes, and snippets.

View tatsuro-ueda's full-sized avatar

Tatsuro Ueda tatsuro-ueda

View GitHub Profile
@mursts
mursts / create-gae-project-flask.sh
Created August 26, 2014 21:34
create-gae-project-flask
#!/bin/sh
if [ $# -eq 0 ]; then
CMD=`basename $0`
echo "usage: ${CMD} projectname"
exit 1
fi
PROJECT_NAME=$1
@mursts
mursts / create-gae-project
Created August 15, 2014 15:35
GAE/Pのプロジェクトテンプレートを作成する(webapp2)
#!/bin/sh
PROJECT_TEMPLATE_PATH=${HOME}/google-cloud-sdk/platform/google_appengine/new_project_template
if [ $# -eq 0 ]; then
CMD=`basename $0`
echo "usage: ${CMD} projectname"
exit 1
fi
@adaline
adaline / twitter_update_with_media.coffee
Last active March 10, 2017 21:40
Node.js module for basic Twitter update_with_media support. You will need to install 'request' packages from npm like so: npm install request
fs = require('fs')
path = require('path')
request = require('request')
class twitter_update_with_media
constructor: (@auth_settings) ->
@api_url = 'https://api.twitter.com/1.1/statuses/update_with_media.json'
post: (status, file_path, callback) ->
r = request.post(@api_url, oauth:@auth_settings, callback)
@tatsuro-ueda
tatsuro-ueda / 【テーブル】テーブルセルに画像を表示し、セルをタップすると個別の画像を表示するには.md
Created August 12, 2012 13:31
【テーブル】テーブルセルに画像を表示し、セルをタップすると個別の画像を表示するには

I suppose you just want to select image by table view.

This is selection table view.

selection

And this is detail view.

detail

@tatsuro-ueda
tatsuro-ueda / 2つのセグエを連続して実行するには.md
Created August 12, 2012 05:11
【セグエ】2つのセグエを連続して実行するには

I tried to move segue continually, but I failed, too.

So I tried to set interval between first segue and second segue for one second.

ss

This works well ! When you push button in red window, green window appears, and after it, blue window appears automatically.

- (void)viewDidLoad
{
@tatsuro-ueda
tatsuro-ueda / 他のビューに移っても値を保持したい.md
Created August 12, 2012 05:09
他のビューに移っても値を保持したい

There is View-independent value keeping tool. You can use:

[[NSUserDefaults standardUserDefaults]setObject:<#(id)#> forKey:<#(NSString *)#>]

For example, you inputs strings or datas in A view, you can store them in above variables. And then, in B view, you can use them by below code:

 [[NSUserDefaults standardUserDefaults]objectOrKey:<#(NSString *)#>]

These are a example of NSUserdefaults data using:

@tatsuro-ueda
tatsuro-ueda / CAレイヤーのドロップシャドウを本体が大きくなる時に一緒に大きくしたい.md
Created August 12, 2012 05:07
【アニメーション】CAレイヤーのドロップシャドウを本体が大きくなる時に一緒に大きくしたい

##Animating a CALayer shadowpath

At first, small square with drop shadow.

ss

When button pushed, square and shadow grow bigger together.

ss

@tatsuro-ueda
tatsuro-ueda / ローカル時間の変換をするには.md
Created August 11, 2012 11:26
ローカル時間の変換をするには

##Convert GMT to IST in iOS

The code below convert GMT to IST.

NSString *inDateStr = @"2000/01/02 03:04:05";
NSString *s = @"yyyy/MM/dd HH:mm:ss";

// about input date(GMT)

NSDateFormatter *inDateFormatter = [[NSDateFormatter alloc] init];

@tatsuro-ueda
tatsuro-ueda / ViewControllerのつなげ忘れ.md
Created August 11, 2012 11:24
【IB】ViewControllerのつなげ忘れ

Have you wired all storyboard object to proper ViewController ? I often forget wiring delegate =)

ss

@tatsuro-ueda
tatsuro-ueda / 【テーブル】【セグエ】テーブルセルからセグエで情報を渡しながら別のビューへ遷移する.md
Created August 11, 2012 11:21
【テーブル】【セグエ】テーブルセルからセグエで情報を渡しながら別のビューへ遷移する

You can wire from TableViewController to other view.

ss

For example, at first, you can set TableViewCell as below:

ss

When tap the cell, the view with the number of tapped cell.