Skip to content

Instantly share code, notes, and snippets.

View gourneau's full-sized avatar

Joshua Gourneau gourneau

View GitHub Profile
@gourneau
gourneau / ElasticSearch.sh
Last active December 12, 2017 21:06
Elastic Search 1.4.2 with Oracle Java 8
### Install Oracle Java 8, this means you agree to their binary license!!
cd ~
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo aptitude -y install oracle-java8-installer
### Download and Install ElasticSearch
@gourneau
gourneau / setup_pandas_notebook.sh
Last active May 2, 2024 04:53 — forked from westurner/setup_pandas_notebook.sh
Setting up dev pandas with OS X 10.9 and IPython notebook
First install brew if you don't have it and XCode if you don't have them already. Also get pip if you don't have it.
Get the 10.9 GFortran from http://coudert.name/software/gfortran-4.8.2-Mavericks.dmg
(http://gcc.gnu.org/wiki/GFortranBinaries)
brew install readline
brew install zeromq
sudo pip install ipython pyzmq tornado pygments jinja2
#optional python -c 'from IPython.external import mathjax; mathjax.install_mathjax()'
@gourneau
gourneau / slice_long_images.py
Created January 9, 2013 20:59 — forked from anonymous/slice_long_images.py
This is a bit of Python code that uses PIL to slice very long images into segment sizes of your choice. For example take a 10,000px tall image, and slice it into 10 10,00px tall images.
import Image
from __future__ import division
import math
import os
"""
This is a bit of Python code that uses PIL to slice very long images into segment sizes of your choice.
For example take a 10,000px tall image, and slice it into 10 10,00px tall images.
thanks to the great docs at http://www.packtpub.com/article/python-image-manipulation
@gourneau
gourneau / index.html
Created December 1, 2012 23:15 — forked from mbostock/.block
World Countries
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.country {
fill: #b8b8b8;
stroke: #fff;
stroke-width: .5px;
stroke-linejoin: round;
}
@gourneau
gourneau / gist:2885082
Created June 6, 2012 21:56 — forked from jeserkin/gist:1953801
Twitter Bootstrap Fluid-Sticky example. Modified martinbean example.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="../assets/css/bootstrap.css" rel="stylesheet">
<style type="text/css">
<html>
<head>
<title>Checkbox</title>
<style>
input[type=checkbox] {
display:none;
}
input[type=checkbox] + label
{
# this way is best if you want to stay up to date
# or submit patches to node or npm
mkdir ~/local
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.profile
# could also fork, and then clone your own fork instead of ry's
git clone git://github.com/ry/node.git
cd node
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal