Skip to content

Instantly share code, notes, and snippets.

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
@interface HeaderView : UIView {
UILabel *titleArea;
}
@property (nonatomic, strong, readwrite) UILabel *titleArea;
mysqlコマンド
mysql> CHANGE MASTER TO
MASTER_HOST='10.0.0.10',
MASTER_USER='ユーザー',
MASTER_PASSWORD='パスワード',
MASTER_LOG_FILE='mysqld-bin.000002',
MASTER_LOG_POS=123;
設定ファイル
[master]
brew install readline
brew link readline
CONFIGURE_OPTS="--with-readline-dir=/usr/local" rbenv install 1.9.3-p194
cd /usr/local/src
wget http://ftp.riken.jp/Linux/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm
yum -y install make gcc gcc-c++ zlib-devel openssl-devel httpd-devel curl-devel readline-devel tk-devel libyaml-devel ncurses-devel gdbm-devel sqlite-devel
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz
tar zxvf ruby-1.9.3-p327.tar.gz
cd ruby-1.9.3-p327
./configure
make && make install
cd ..
sqlite3 -html main.db "select timestamp, from_dispname, body_xml from Messages where chatname like '%chatid'"
@runeleaf
runeleaf / gist:3754073
Created September 20, 2012 05:10
GridViewController
class GridViewController < AQGridViewController
def viewDidLoad
@data = ['001.jpg', '002.jpg', '003.jpg', '004.jpg', '005.jpg', '006.jpg', '007.jpg', '008.jpg', '009.jpg', '010.jpg']
@grid_view = AQGridView.alloc.initWithFrame(self.view.bounds)
@grid_view.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight
@grid_view.autoresizesSubviews = true
@grid_view.delegate = self
@runeleaf
runeleaf / Pods.bridgesupport
Created September 14, 2012 13:20
Pods.bridgesupport
304 <method selector='setCellSize:'>
305 <arg declared_type='struct CGSize' type='{CGSize=ff}' name='cellSize' index='0'/>
306 <retval declared_type='void' type='v'/>
307 </method>
@runeleaf
runeleaf / Rakefile
Created September 10, 2012 10:03
Rakefile
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
require 'bundler'
Bundler.require
Motion::Project::App.setup do |app|
app.name = 'app_name'
app.device_family = [:iphone, :ipad]
app.icons = ['icon.png', 'iconx2.png']
@runeleaf
runeleaf / gist:3486056
Created August 27, 2012 06:03
BluetoothController
#coding: utf-8
class BluetoothController < UIViewController
attr_accessor :session, :peer_id, :peers, :state, :text_field
def viewDidLoad
self.title = 'bluetooth test'
self.view.backgroundColor = "#FFFFFF".to_color
screen = UIScreen.mainScreen.bounds
self.text_field = UITextField.alloc.initWithFrame [[0, 30], [200, 26]]
@runeleaf
runeleaf / gist:3311681
Created August 10, 2012 06:18
CameraController
#coding: utf-8
class CameraController < UIViewController
def loadView
self.view = UIImageView.alloc.init
end
def viewDidLoad
BW::Device.camera.any.picture(media_types: [:movie, :image]) do |result|
image = result[:original_image]
image_view = UIImageView.alloc.init