Skip to content

Instantly share code, notes, and snippets.

Avatar
☀️
😎

Simeon Willbanks simeonwillbanks

☀️
😎
View GitHub Profile
View php_property_accessors_person.rb
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
View php_property_accessors_person.py
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 Mar 20, 2010
PHP: Property Accessors Example Person Version 1
View php_property_accessors_person_ver1.php
<?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 Mar 20, 2010
PHP: Property Accessors Example Person Version 2
View php_property_accessors_person_ver2.php
<?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 Mar 20, 2010
PHP: Property Accessors Example Person
View php_property_accessors_person_ex.php
<?php
class Person {
public $first_name;
public $last_name;
public $address;
public $city;
public $state;
public $zip;
View gist:592850
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 Sep 23, 2015
#professional_development #linkedin #html Profile HTML
View LinkedIn_Profile_Positions.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 Sep 24, 2015
Programming: "Top 50 Programming Quotes of All Time" from Jun Auza at TechSource
View top-50-programming-quotes-of-all-time.txt
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 Feb 11, 2011
#PHP php_notice_sanity_check.php #sag
View php_notice_sanity_check.php
<?php
error_reporting(E_ALL);
require_once('../src/Sag.php');
@simeonwillbanks
simeonwillbanks / SagConfigurationCheckTest.php
Created Feb 11, 2011
#PHP Sag Configuration Check Test #couchdb #sag #opensource
View SagConfigurationCheckTest.php
<?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