Skip to content

Instantly share code, notes, and snippets.

View theclanks's full-sized avatar

Luis Carlos Otte Junior theclanks

View GitHub Profile
@kenkellner
kenkellner / startstop.R
Last active December 9, 2016 13:12
Algorithm to select time series data start and stop times to maximize R2 of a linear model
###########################################################
###### #######
###### GET ACTUAL START/STOP TIMES #######
###### #######
###########################################################
#Read in input file
#Should be called startstop.csv and should be in same directory as the .dat files
#File should have three columns labeled start, stop, and plot (for plot names)
#Dates in start stop should be formatted e.g. 7/16/2014 13:12
@jibs
jibs / gcloud-port-forward.md
Created April 25, 2015 15:57
port forwarding with a google cloud instance

Google cloud's ssh command lets you pass standard ssh flags. To, for example, forward local port 8088 to port 8088 on a vm instance, all you need to do is:

gcloud compute  ssh --ssh-flag="-L 8088:localhost:8088"  --zone "us-central1-b" "example_instance_name"

Now browsing to localhost:8088 works as it would with standard ssh.