I hereby claim:
- I am pyrmont on github.
- I am pyrmont (https://keybase.io/pyrmont) on keybase.
- I have a public key whose fingerprint is 48CB 53C1 4452 A166 43C0 C90E 871B 359F 2AC9 F4F0
To claim this, I am signing this object:
Premise | |
- consider X, a non-zero integer with n digits; | |
- consider Y, a non-zero integer that is formed by moving the first digit from X to the position of the last digit and shifting all of the remaining digits one place to their immediate left; | |
- there is a value for X such that, when doubled, equals Y. | |
Axioms | |
- when you double an integer, you multiply each of its digits by 2; | |
- the product of each digit being multipled by 2 may be incremented by 1 if the digit to its immediate right was 5 or more. |
<?php | |
$root = $_SERVER['DOCUMENT_ROOT']; | |
chdir($root); | |
$path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/'); | |
if(file_exists($root.$path)) { | |
if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/') { |
<?php | |
/* | |
Plugin Name: Localist | |
Plugin URI: | |
Description: Localist allows you to reach an installation of WordPress regardless of the WordPress address defined in the database. | |
Version: 1.0 | |
Author: Michael Camilleri | |
Author URI: http://inqk.net/ | |
License: Public Domain | |
*/ |
default_run_options[:pty] = true # Must be set for the password prompt from git to work | |
set :ssh_options, { :forward_agent => true } | |
set :user, "smash" | |
set :application, "SMASH! Join Us" | |
set :domain, "linode.smash.org.au" | |
set :repository, "file://." | |
set :deploy_to, "/var/www/smash.org.au/2014-staff-call" | |
set :shared_path, "#{deploy_to}/shared" | |
set :use_sudo, false |
daemon off; | |
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /usr/local/etc/nginx/mime.types; # Update if necessary |
daemon off; | |
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /usr/local/etc/nginx/mime.types; # Update if necessary |
I hereby claim:
To claim this, I am signing this object:
My friend Rob tweets:
The more experience I get with Ruby, the more irresponsible I feel when teaching it to new devs.
OK, so I think Ruby is a good language to use to start teaching programming for a number of reasons.
First, I believe it's best to start beginners with an object-oriented language. The OO paradigm provides, in my opinion, the best balance between power and comprehensibility. I'm happy to concede that OO languages do not immediately make sense to a lot of people in a way that procedural languages do. After all, if you can read a recipe, you can basically read procedural code. The problem is that it's pretty difficult to do anything interesting in procedural languages and doing interesting things is what will motivate a person to get past their early, and inevitable, frustration. You might accept this but argue that functional languages have a high degree of power and should be the starting point. Unfortunately, while functional
[Unit] | |
Description=Node.js process for Shout | |
[Service] | |
ExecStart=/usr/bin/shout | |
Restart=always | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=shout-irc | |
User=shout-irc |
# Current | |
case obj | |
when String | |
"String" | |
else | |
"Other" | |
end | |
# Deconstructing | |
case obj |