Skip to content

Instantly share code, notes, and snippets.

View csanz's full-sized avatar
🎯
Focusing

Christian Sanz csanz

🎯
Focusing
View GitHub Profile
@csanz
csanz / jsandinheritance.js
Created August 14, 2012 20:39
Super Simple JavaScript & Inheritance Example
// Generic Object
function Spaceship(){}
Spaceship.prototype.navigate = function(distance, direction){
console.log(['moved',distance,'miles towards',direction].join(' '))
return this
}
// Specific Spaceships
@csanz
csanz / test.js
Created July 27, 2012 17:25
test
function test(){
}
@csanz
csanz / deletephotosiphone.md
Created July 20, 2012 15:23
How to delete all photos from your iPhone

screenshot

FOR MAC

  • connect your idevice
  • open preview
  • select File > Import from (your Idevice name)
  • then select all and choose the red circular symbol at the bottom
  • this will delete all your photos and videos in one go
@csanz
csanz / reset.md
Created July 15, 2012 04:57
Reset Desktop Notification Settings

Firefox browser:

  • Access the Firefox "Addons" -> "Extensions"
  • Locate the extension "HTML5 Notifications" and click the "Options" button. If you do not see the "HTML5 Notifications" extension, you can download the extension here.
  • Remove the permission for the web URL address associated with your PHP Live! system
  • Access the operator console and refresh the desktop notification area to be able to re-request the notification.
  • Click "Allow" to enable the Desktop Notification

Google Chrome browser:

@csanz
csanz / lesson1.md
Created July 12, 2012 23:22
Lesson 1 - Boostrap and Server Assignment

Lesson 1

  • Setup a node.js website on your local machine using expresjs, jade and stylus
  • Setup bootstrap (from Twitter) on this new website
  • Run it and preview it

Next Lesson: Deploy to a server and add database stuff.

@csanz
csanz / install_varnish.md
Created July 4, 2012 22:14
Install Varnish Cache / Ubuntu
@csanz
csanz / mongodb.js
Created July 3, 2012 05:46
You'd be shocked how fast this query runs
var users = []
db.users.find({}, {_id:1}).limit(15000).forEach(function(data){ users.push(data._id) })
db.activities.find({'user.id': { $in: users }}).sort({created_at: -1})
// in less than 2 secs.
@csanz
csanz / aplusk.json
Created June 27, 2012 22:49
Ashton Kutcher Created a Geeklist Account w000t!
db.users.findOne({'oauth.screen_name': 'aplusk'},{referrer:1, created_at:1, 'oauth.screen_name':1, name:1})
{
"_id" : ObjectId("REMOVED"),
"created_at" : ISODate("2012-04-19T14:37:25.318Z"),
"name" : "ashton kutcher",
"oauth" : {
"screen_name" : "aplusk"
},
"referrer" : "http://t.co/jabb5osC"
}
Delphi Solutions develops user-friendly, intelligent software to improve
government performance. Recently founded by Stanford technologists, and
backed by prominent Silicon Valley entrepreneurs and investors, Delphi’s
team has a proven track record for disrupting major market sectors like
finance and defense. Founding chairman Joe Lonsdale (Palantir, Addepar,
Formation 8) has shown how talented and passionate engineers can
transform the delivery of enterprise software. We are now tackling the
hardest problem in the biggest space: cracking open the government backoffice to make it smarter and more accessible than ever.
Delphi team members receive equity stakes, competitive salaries and benefits,
customizable workstations, and the opportunity to take on immense challenges.
@csanz
csanz / links.md
Created June 5, 2012 01:06
How to add links inside Geeklist as a gist