Skip to content

Instantly share code, notes, and snippets.

View tomconte's full-sized avatar
💻
Working from home

Thomas Conté tomconte

💻
Working from home
View GitHub Profile
@tjsingleton
tjsingleton / Chef Solo Bootstrap with Ruby 2.2.2
Last active November 5, 2021 21:41 — forked from nyxwulf/Chef Bootstrap Ruby 1.9.3-p194
Chef Solo Bootstrap with Ruby 2.2.2
#!/usr/bin/env bash
apt-get -y update
apt-get -y upgrade
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev libffi-dev libjemalloc-dev
apt-get -y install autoconf curl bzip2
apt-get -y autoremove
apt-get -y clean
cd /usr/local/src
curl http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.gz
/*
Developed by Kevin L. Hopkins (http://kevin.h-pk-ns.com)
You may borrow, steal, use this in any way you feel necessary but please
leave attribution to me as the source. If you feel especially grateful,
give me a linkback from your blog, a shoutout @Devneck on Twitter, or
my company profile @ http://wearefound.com.
/* Expects parameters of the directory name you wish to save it under, the url of the remote image,
and the Image View Object its being assigned to. */
cachedImageView = function(imageDirectoryName, url, imageViewObject)
@ryanflorence
ryanflorence / static_server.js
Last active March 13, 2024 08:05
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);