This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
url 'https://vim.googlecode.com/hg/', :revision => '10d35c8b50e3' | |
version '7.4' | |
def features; %w(tiny small normal big huge) end | |
def interp; %w(lua mzscheme perl python python3 tcl ruby) end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start on filesystem and started networking | |
stop on shutdown | |
author "Santosh Srinivas" | |
description "Ghost Upstart Job for Thoughts instance" | |
version "0.1" | |
respawn | |
respawn limit 5 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.Tax = Ember.Object.extend({}); | |
App.taxesController = Ember.ArrayController.create({ | |
content: [ | |
{name:"tax1",rate:"10",number_id:"TaxIDNum"}, | |
{name:"tax2",rate:"9",number_id:null} | |
], | |
newTax: function() { | |
this.pushObject(App.Tax.create({})); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple ggplot2 heatmap | |
# with colorBrewer "spectral" palette | |
doInstall <- FALSE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("ggplot2", "reshape2", "RColorBrewer") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# Generate a random matrix | |
# This can be any type of numeric matrix, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install.packages("xtsExtra", repos="http://R-Forge.R-project.org") | |
require(PerformanceAnalytics) | |
require(xtsExtra) #if you get error, please install xtsExtra from r-forge as shown in the top line | |
#replicate example provided in chart.TimeSeries with plot.xts | |
# These are start and end dates, formatted as xts ranges. | |
## http://www.nber.org-cycles.html | |
cycles.begin.dates<-c("1857-06", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsi2Vix<-function(ticker,vix) | |
{ | |
getSymbols(c('SPY','VIX'),from='1995-01-01',index.class=c("POSIXt","POSIXct")) | |
rsi2<-RSI(Cl(SPY),2) | |
signal<-ifelse(rsi2>90,-1,0) | |
temp<-ifelse(rsi2<10,1,0) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Script to record and tag spotify tracks, by Lloyd Moore *) | |
(* Make sure you are already recording in Audio Hijack Pro with a session called 'spotifySession' *) | |
tell application "Spotify" | |
set currentTrack to (current track) | |
set trackName to (name of currentTrack) | |
tell application "Audio Hijack Pro" | |
set theSession to my getSession() | |
end tell | |
repeat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes. | |
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed | |
* | |
* Usage: | |
* $ casperjs screenshots.js http://example.com | |
*/ | |
var casper = require("casper").create(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drawing a scatter plot of raster images | |
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("png", "sna") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# Go to https://www.gosquared.com/resources/2400-flags, download the ZIP, | |
# and put the 64 x 64 files into a directory of your choosing. | |
# Then setwd() to that directory: | |
setwd("C:/Dropbox/isDotR_Files/flagIcons") |
OlderNewer