Skip to content

Instantly share code, notes, and snippets.

View ojacquemart's full-sized avatar

Olivier Jacquemart ojacquemart

View GitHub Profile
@ojacquemart
ojacquemart / mongom101j-week2-exercise2.scala
Last active December 14, 2015 17:59
Mongo M101J : Week2#Exercise2
import play.api._
import play.api.libs.json._
import play.api.mvc._
import play.api.Logger
import play.api.Play.current
import play.modules.reactivemongo._
import play.modules.reactivemongo.ReactiveMongoPlugin
import org.joda.time.DateTime
@ojacquemart
ojacquemart / gist:5060041
Created February 28, 2013 20:54
Get webpage content in python.
import urllib2
response = urllib2.urlopen('http://github.com')
html = response.read()
print html
/**
Robin est le genre de personne à avoir plusieurs comptes dans plusieurs banques.
Elle s'est créée un petit programme en Scala pour pouvoir récupérer le solde de ses comptes auprès
des différentes banques, à partir de son propriétaire.
*/
case class Account(id: String, bankName: String, owner: String, amount: Int)
object AccountRepository extends App {
@ojacquemart
ojacquemart / sublime.text.shortcuts
Created October 31, 2012 12:11
sublime text 2 eclipse shortcuts
[
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line.sublime-macro"} },
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["ctrl+alt+j"], "command": "join_lines" },
{ "keys": ["ctrl+alt+down"], "command": "duplicate_line" },
{ "keys": ["shift+ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["ctrl+shift+s"], "command": "save_all" },
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["shift+ctrl+f4"], "command": "close_all" },