start new:
tmux
start new with session name:
tmux new -s myname
| - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
| { | |
| static NSString *CellIdentifier = @"Cell"; | |
| UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
| // Configure the cell... | |
| if (!cell) { | |
| cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault | |
| reuseIdentifier:CellIdentifier] autorelease]; | |
| } |
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "time" | |
| ) | |
| var urls = []string{ | |
| "https://splice.com/", |
| # the following two lines give a two-line status, with the current window highlighted | |
| hardstatus alwayslastline | |
| hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
| # huge scrollback buffer | |
| defscrollback 5000 | |
| # no welcome message | |
| startup_message off |
| <?php | |
| ob_start(); | |
| var_dump($this); | |
| error_log(ob_get_clean()); | |
| ?> |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
Setup a local CocoaPods directory, and register it with CocoaPods
mkdir -p ~/CocoaPods/Local
(cd ~/CocoaPods/Local; git init)
pod repo add ~/CocoaPods/Local
| -(void)fillCircleCenteredAt:(CGPoint)center | |
| { | |
| UIBezierPath *path = [UIBezierPath bezierPath]; | |
| [path addArcWithCenter:center | |
| radius:50.0 | |
| startAngle:0.0 | |
| endAngle:2.0 * M_PI | |
| clockwise:NO]; | |
| [path fill]; | |
| } |
| -(UIBezierPath *)triangleWithPoints:(CGPoint *)points | |
| { | |
| UIBezierPath *path = [UIBezierPath bezierPath]; | |
| [path moveToPoint:points[0]] | |
| [path addLineToPoint:points[1]]; | |
| [path addLineToPoint:points[2]]; | |
| [path closePath]; | |
| return path; | |
| } |
| # tell screen how to set colors. AB = background, AF=foreground | |
| termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' | |
| # erase background with current bg color | |
| defbce "on" | |
| # show status bar | |
| hardstatus alwayslastline | |
| hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]' | |
| # don't display the copyright page |