Skip to content

Instantly share code, notes, and snippets.

🥑
I like avocados

Ryan Schumacher jrschumacher

🥑
I like avocados
Block or report user

Report or block jrschumacher

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jrschumacher
jrschumacher / MongoId2.php
Created Dec 5, 2012
MongoId to handle psudo MongoId objects (especially when dealing with json)
View MongoId2.php
<?php
class MongoId2 extends MongoId {
public function __construct($id = null) {
if(is_array($id)) {
$id = (object) $id;
}
if(is_object($id) && isset($id->{'$id'})) {
$id = $id->{'$id'};
}
View dev.zone
$TTL 60
$ORIGIN dev.
@ 1D IN SOA localhost. root.localhost. (45 3H 15M 1W 1D)
1D IN NS localhost.
1D IN A 127.0.0.1
*.dev. 60 IN A 127.0.0.1
go.dev. 60 IN A 127.0.0.1
*.go.dev. 60 IN A 127.0.0.1
View test_php_skill.php
<?php
/*****************************************
* Created this test for job interviews. *
*****************************************/
/**
* Directions
*
* Read the direction in the Q and respond below A.
@jrschumacher
jrschumacher / sub2path.pl
Created Jan 11, 2012
Wildcard domain for local development using Apache Mod Rewrite
View sub2path.pl
#!/usr/bin/perl
###
# Sub2Path is a little script which convert a url with subdomains to a path
#
# To be used with Apache ModRewrite RewriteMap found: http://goo.gl/8WUvm
# Follow the conversation at: http://goo.gl/Mzc5E
# Props to 42foo.com: http://goo.gl/mut77
#
# MIT license
You can’t perform that action at this time.