Skip to content

Instantly share code, notes, and snippets.

View simeonwillbanks's full-sized avatar
☀️
😎

Simeon Willbanks simeonwillbanks

☀️
😎
View GitHub Profile
@simeonwillbanks
simeonwillbanks / php_property_accessors_person.rb
Created March 20, 2010 20:56
#Ruby Property Accessors Person
class Person
def initialize(first_name, last_name)
@first_name = first_name
@last_name = last_name
end
# access method
def full_name
"%s %s" % [@first_name, @last_name]
end
end
@simeonwillbanks
simeonwillbanks / php_property_accessors_person.py
Created March 20, 2010 20:58
Python: Property Accessors Person
class Person(object):
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
# property decorator
@property
def full_name(self):
return "%s %s" % (self.first_name, self.last_name)
me = Person("Simeon", "Willbanks")
@simeonwillbanks
simeonwillbanks / php_property_accessors_person_ver1.php
Created March 20, 2010 21:01
PHP: Property Accessors Example Person Version 1
<?php
class Person {
public $first_name;
public $last_name;
public function __construct($first_name, $last_name)
{
$this->first_name = $first_name;
$this->last_name = $last_name;
@simeonwillbanks
simeonwillbanks / php_property_accessors_person_ver2.php
Created March 20, 2010 21:03
PHP: Property Accessors Example Person Version 2
<?php
class Person {
public $first_name;
public $last_name;
public function __construct($first_name, $last_name)
{
$this->first_name = $first_name;
$this->last_name = $last_name;
@simeonwillbanks
simeonwillbanks / php_property_accessors_person_ex.php
Created March 20, 2010 21:05
PHP: Property Accessors Example Person
<?php
class Person {
public $first_name;
public $last_name;
public $address;
public $city;
public $state;
public $zip;
@simeonwillbanks
simeonwillbanks / gist:592850
Last active September 23, 2015 17:47
#Python mogrify
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def mogrify(li):
... for i, v in enumerate(li):
... li[i] = v * 2
...
>>> x = [1,2,3]
>>> id(x)
445976
@simeonwillbanks
simeonwillbanks / LinkedIn_Profile_Positions.html
Last active September 23, 2015 22:18
#professional_development #linkedin #html Profile HTML
<!-- LinkedIn Profile Position Template -->
<ul>
<li></li>
<li></li>
</ul>
<!-- Director of Product Development, Publish2 -->
<ul>
<li>Launched News Exchange web and print content sharing product, garnering a Knight-Batten Special Distinction Award and a <em>TechCrunch</em> Disrupt Cup finalist place </li>
<li>Improved Link Journalism product by simplifying JavaScript bookmarklet user experience, refactoring PHP web application, and normalizing MySQL database </li>
@simeonwillbanks
simeonwillbanks / top-50-programming-quotes-of-all-time.txt
Last active September 24, 2015 11:27
Programming: "Top 50 Programming Quotes of All Time" from Jun Auza at TechSource
http://www.junauza.com/2010/12/top-50-programming-quotes-of-all-time.html
50. "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."
- Rick Cook
49. "Lisp isn't a language, it's a building material."
- Alan Kay.
48. "Walking on water and developing software from a specification are easy if both are frozen."
- Edward V Berard
@simeonwillbanks
simeonwillbanks / php_notice_sanity_check.php
Created February 11, 2011 17:22
#PHP php_notice_sanity_check.php #sag
<?php
error_reporting(E_ALL);
require_once('../src/Sag.php');
@simeonwillbanks
simeonwillbanks / SagConfigurationCheckTest.php
Created February 11, 2011 17:26
#PHP Sag Configuration Check Test #couchdb #sag #opensource
<?php
/*
Copyright 2010 Sam Bisbee
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0