Skip to content

Instantly share code, notes, and snippets.

View binarypie's full-sized avatar

Charles Christolini binarypie

View GitHub Profile
try {
Routes::map(array({
'/do/some/(?P<thing>\w+)' => 'Thing::do',
}));
} catch (PathNotFoundException $e) {
echo '<p>404 Error:</p><p>'.$e->getMessage().'</p>Allowed Urls:<hr />';
foreach ($urls as $path => $function) {
echo $path.' => '.$function.'<br />';
}
} catch (Exception $e) {
@binarypie
binarypie / styleguide.php
Created September 2, 2009 16:45
PHP Code Style Guideline
<?php
/**
* Please use doxygen notatin when creating documentation for classes and functions
* Code indentation is 4 spaces DO NOT USE TABS!!
*
* @param object $object This object does something
* @param int $options This integer can count by one
* @return echos json This function returns something
*/
@binarypie
binarypie / Comcast Troubleshooting
Created October 25, 2009 21:03
Troubleshooting issues with comcast
Testing Notes:
1) Resetting the modem has done nothing
2) Connecting my computer directly to the modem has done nothing
3) Line test shows some packet loss: http://www.dslreports.com/linequality/nil/2579328
4) Bandwidth tests show normal for local sites and less than 1/10th normal speed from the east coast
5) Surfing is hit of miss. Sometimes the site loads sometimes i have to refresh the page a couple times to get it to load.
6) Steaming video or flash is impossible. Worse than dial up. Its not slow to stream it just stops streaming the middle never to continue
7) Traces are hit for miss. Some work some timeout after 64 hops.
So I try another dictionary! Webster's New World Dictionary
says: "[POLY- + [BI)NOMIAL]", which sends me to look up the word
binomial. This says, indeed, "[< LL binomius < bi- + Gr. nomos, law
+ -AL]". It is defined as "a mathematical expression consisting of
two terms connected by a plus or minus sign." Hmm... maybe each term
was considered to be a "law" or rule, and a binomial tells you to
follow both rules, then add the results together.
I know one good Web source that may be able to clear up the matter:
10.0.1.3 - - [12/Apr/2010:13:47:00 -0700] "GET /wizard/?boot=paq&kind=microsite HTTP/1.1" 200 55955 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7"
10.0.1.3 - - [12/Apr/2010:13:47:00 -0700] "GET /wizard/detect.js?6b4557e2a53f070aec5f195cfe9e3401 HTTP/1.1" 304 - "http://charles.transpond.com/wizard/?boot=paq&kind=microsite" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7"
10.0.1.3 - - [12/Apr/2010:13:47:01 -0700] "GET /js/json2.js?a05edac905f566df28461bd4445a158d HTTP/1.1" 304 - "http://charles.transpond.com/wizard/?boot=paq&kind=microsite" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7"
10.0.1.3 - - [12/Apr/2010:13:47:01 -0700] "GET /jquery/plugin/query/jquery.query.js?6c886798327ba2f58506667c28201ed5 HTTP/1.1" 304 - "http://charles.transpond.com/wizard/?boot=paq&k
[Mon Apr 19 17:20:22 2010] [error] [client 10.0.1.3] File does not exist: /Users/charles/Projects/Transpond/webapps/site/public/images/button_left.gif, referer: http://charles.transpond.com/wizard/?id=6741
[Mon Apr 19 17:20:22 2010] [error] [client 10.0.1.3] File does not exist: /Users/charles/Projects/Transpond/webapps/site/public/images/btn_done-green.jpg, referer: http://charles.transpond.com/wizard/?id=6741
[Mon Apr 19 17:20:22 2010] [error] [client 10.0.1.3] File does not exist: /Users/charles/Projects/Transpond/webapps/site/public/images/button_left.gif
[Mon Apr 19 17:20:22 2010] [error] [client 10.0.1.3] File does not exist: /Users/charles/Projects/Transpond/webapps/site/public/images/btn_done-green.jpg
[Mon Apr 19 17:20:23 2010] [error] [client 10.0.1.3] File does not exist: /Users/charles/Projects/Transpond/webapps/site/public/images/bg_channelBox.gif, referer: http://charles.transpond.com/wizard/?id=6741
[Mon Apr 19 17:20:23 2010] [error] [client 10.0.1.3] File does not exist: /Users/charles/Project
function getLocation() {
// The static location.
if (typeof widget == 'undefined' || props.staticLocation == true) {
// we don't need to update our location as we are static
if (searchActive == false &&
center_default.lat === props.defaultLatitude &&
center_default.lng === props.defaultLongitude) {
return;
}
center_default.lat = props.defaultLatitude;
Testing the gist plugin for vim!
/*
* Top level properites are things defined on a per-app basis
* An app can container many pages
* Pages can contain many components
* Components may exist on many pages
*
* */
{
id: 324324,
version: 12312312,
/* iOS scrollpane jQuery plugin, v1.0
* ==================================
*
* (c) 2011 Dave Gurnell
* http://boxandarrow.com
*
* Distributed under the Creative Commons Attribution 3.0 Unported licence:
* http://creativecommons.org/licenses/by/3.0/
*/