start new:
tmux
start new with session name:
tmux new -s myname
| getMonth(){ | |
| let months = []; | |
| for (var i = 1; i <= 12; i++) { | |
| i < 10 ? months.push('0' + i) : months.push(i); | |
| } | |
| return months; | |
| } | |
| vs |
| require 'uri' | |
| require 'nokogiri' | |
| class DolarTodayBot | |
| def work | |
| post_to_slack | |
| end | |
| private | |
| def image_src |
| if let trans:SKPaymentTransaction = transaction as? SKPaymentTransaction{ | |
| switch trans.transactionState { | |
| case .Purchased: | |
| println("Product Purchased"); | |
| SKPaymentQueue.defaultQueue().finishTransaction(transaction as SKPaymentTransaction) | |
| break; | |
| case .Failed: | |
| println("Purchased Failed"); | |
| SKPaymentQueue.defaultQueue().finishTransaction(transaction as SKPaymentTransaction) |
| # | |
| # Usage: sh kill_port.sh p | |
| # where p is a port like 3000 (rails), 9393 (shotgun), etc. | |
| # enjoy | |
| # | |
| kill -9 `lsof -w -n -i tcp:$1 | awk '$2!="PID" {print $2;}'` |
| class AppDelegate | |
| attr_accessor :captureMovieFileOutput | |
| def applicationDidFinishLaunching(notification) | |
| buildWindow | |
| end | |
| def buildWindow | |
| @av = AVScreenShackDocument.alloc.init |
| # Ruby 1.9 using ruby-ni | |
| # | |
| # VERSION 0.0.1 | |
| # | |
| FROM base | |
| MAINTAINER Ivan Acosta-Rubio "ivan@softwarecriollo.com" | |
| ADD https://gist.github.com/ivanacostarubio/9309be8a79a94aafd02d/raw/8e84fac50a57a23f191eccf5e41bae4ecde80873/gistfile1.txt /etc/resolv.conf | |
| # Installing basic stuf: wget, git, ruby |
| // Model | |
| // OAStack.m | |
| @protocol OAStack | |
| - (void) pushData:(id)data; | |
| - (id) popData; | |
| @optional | |
| - (void) purgeStack; |
| include Math;R1=1.0; R2=2.0;K2=5.0 | |
| SS=40;K1=SS*K2*3/(8*(R1+R2));def rf(a, b) | |
| cosA=cos(a);sinA=sin(a);cosB=cos(b);sinB=sin(b) | |
| o=Array.new(SS).fill{Array.new(SS).fill(' ')};b=Array. | |
| new(SS).fill{ Array.new(SS).fill(0)}; t=0.0;while t<2*PI | |
| cost=cos(t);sint=sin(t);p=0.0;while p<2*PI;cosp=cos(p);sinp= | |
| sin(p);cx=R2+R1*cost;cy=R1* sint;x=cx*(cosB*cosp+sinA* | |
| sinB*sinp)-cy*cosA*sinB; y=cx*(sinB*cosp-sinA*## | |
| cosB*sinp)+cy*cosA*cosB ;z=K2+cosA*cx*sinp+cy* | |
| sinA;ooz=1/z;xp=(SS/2+K1* ooz*x).to_i ;yp= (SS/2- |