Skip to content

Instantly share code, notes, and snippets.

Go to your public_html directory.

cd ~/public_html

Download WordPress.

wget http://wordpress.org/latest.tar.gz
@benmanns
benmanns / rails-stripe-membership-saas.diff
Created October 25, 2012 22:14
This diff shows the differences between a fresh Rails installation and RailsApps/rails-stripe-membership-saas as of ea5bc35c02de4be277682dca964bff8dcb84917c.
diff --git a/.gitignore b/.gitignore
index eb3489a..a6c2a9c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,15 +1,77 @@
+#----------------------------------------------------------------------------
+# Ignore these files when commiting to a git repository.
+#
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
@benmanns
benmanns / chef_solo_bootstrap.sh
Created October 28, 2012 14:29 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz
tar -xvzf ruby-1.9.3-p286.tar.gz
cd ruby-1.9.3-p286/
./configure --prefix=/usr/local
make
make install
@benmanns
benmanns / index.html
Created November 3, 2012 14:06 — forked from mbostock/.block
Spermatozoa
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.1"></script>
<style type="text/css">
body {
background: #000;
}
if(localStorage.documents.indexOf("news-website-demo") === -1) { localStorage.documents += ",news-website-demo" }
localStorage.setItem('documents-news-website-demo', "{\"mockups\":[{\"top\":19,\"left\":23,\"z_index\":0,\"tool\":\"rectangle\",\"width\":851,\"height\":26,\"color\":\"#dedede\",\"border\":true},{\"top\":17,\"left\":29,\"z_index\":0,\"tool\":\"heading\",\"text\":\"News Website\",\"size\":\"25\",\"color\":\"black\"},{\"top\":22,\"left\":213,\"z_index\":0,\"tool\":\"label\",\"text\":\"New\",\"size\":\"14\",\"color\":\"#383838\"},{\"top\":72,\"left\":81,\"z_index\":0,\"tool\":\"paragraph\",\"text\":\"Open source localStorage based mockup tool\",\"width\":596,\"background\":\"#dedede\"},{\"top\":23,\"left\":258,\"z_index\":0,\"tool\":\"label\",\"text\":\"Threads\",\"size\":\"14\",\"color\":\"#383838\"},{\"top\":24,\"left\":330,\"z_index\":0,\"tool\":\"label\",\"text\":\"Comments\",\"size\":\"14\",\"color\":\"#383838\"},{\"top\":24,\"left\":419,\"z_index\":0,\"tool\":\"label\",\"text\":\"Ask\",\"size\
(function(){var global = this;function debug(){return debug};function require(p, parent){ var path = require.resolve(p) , mod = require.modules[path]; if (!mod) throw new Error('failed to require "' + p + '" from ' + parent); if (!mod.exports) { mod.exports = {}; mod.call(mod.exports, mod, mod.exports, require.relative(path), global); } return mod.exports;}require.modules = {};require.resolve = function(path){ var orig = path , reg = path + '.js' , index = path + '/index.js'; return require.modules[reg] && reg || require.modules[index] && index || orig;};require.register = function(path, fn){ require.modules[path] = fn;};require.relative = function(parent) { return function(p){ if ('debug' == p) return debug; if ('.' != p.charAt(0)) return require(p); var path = parent.split('/') , segs = p.split('/'); path.pop(); for (var i = 0; i < segs.length; i++) { var seg = segs[i]; if ('..' == seg) path.pop(); else if ('.' != seg) path.push(seg); } return require(path.join('/'), parent); };};require.register("neuralnet
@benmanns
benmanns / serial-led.ino
Last active December 13, 2015 19:38
Controlling the LED by sending Y or N over the serial connection.
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
Serial.println("Y for on, N for off.");
}
int ledOn = 0;
void loop() {
@benmanns
benmanns / servos.ino
Created February 18, 2013 15:51
Control a servo with a potentiometer. Configured for a HITECH Deluxe HS-322HD.
#include <Servo.h>
Servo servo;
const int analogPin = 0;
const int servoPin = 9;
// The minimum pulse width corresponding to 0-degrees on the servo.
// Default is 544.
@benmanns
benmanns / matdot.cl
Created March 13, 2013 02:34
An OpenCL kernel for computing the dot product of two matrices.
__kernel void matdot(__global double * outputC, int widthA, int heightA, int widthB, int heightB, __global double* inputA, __global double* inputB) {
int column = get_global_id(0);
int row = get_global_id(1);
double sum = 0.0;
for (int i = 0; i < widthA; i++) {
sum += inputA[row * widthA + i] * inputB[i * widthB + column];
}
outputC[row * widthB + column] = sum;
}
git bisect start HEAD origin --
bundle exec script/server
[ 200 -eq $(curl --write-out %{http_code} --silent --output /dev/null http://localhost:3000) ] && git bisect good || git bisect bad