The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Revised by Bytes Unlimited : June 14th 2017
<?php | |
/* | |
Plugin Name: Simple Proxy | |
Description: A very simple proxy. Useful when you're moving from one server to another. | |
Author: Greg Priday | |
Author URI: http://siteorigin.com/ | |
Version: 1.0 | |
*/ | |
function simple_proxy_admin_menu(){ |
// Ruby = 5.times { |i| puts i } | |
// JS = (1).times(function(i){console.log(i);}) | |
Number.prototype.times = function(cb) { | |
var i = -1; | |
while (++i < this) { | |
cb(i); | |
} | |
return +this; |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
# Live coding example for Retune conference 2014 | |
# 1) Press Run (Cmd+R) to start | |
# 2) Make changes (e.g. comment in/out various lines in :beats & :amen) | |
# 3) Press Run again (changes will only be audible from next queue point) | |
# compute loop length (4 bars), bar & quarter note durations | |
dur = sample_duration :loop_compus | |
bar = dur / 4 | |
quart = dur / 16 |
def rot_n_char(char, rot_by) | |
fail ArgumentError, "First argument must be a 1-letter String (got `#{char}')" unless char.length == 1 | |
case char | |
when ('a'..'z') | |
((char.ord - 'a'.ord + rot_by) % 26 + 'a'.ord).chr | |
when ('A'..'Z') | |
((char.ord - 'A'.ord + rot_by) % 26 + 'A'.ord).chr | |
else | |
char |
require 'bcrypt' | |
class User | |
include DataMapper::Resource | |
attr_accessor :password, :password_confirmation | |
timestamps :at | |
property :id, Serial |