Skip to content

Instantly share code, notes, and snippets.

View jfstgermain's full-sized avatar

Jean-François St-Germain jfstgermain

View GitHub Profile
@jfstgermain
jfstgermain / hypem.php
Created October 2, 2015 15:53 — forked from tcz/hypem.php
Copy Hypem favorites to Spotify
<?php
if ($argc !== 2)
{
die("Usage: php {$argv[0]} hypem_user_name\n\n");
}
$user = $argv[1];
$page = 1;
$all_songs = array();
@jfstgermain
jfstgermain / gist:3801417
Created September 28, 2012 18:33
Installing jitsu in cloud9
npm http 200 https://registry.npmjs.org/revalidator/-/revalidator-0.1.2.tgz
npm ERR! error rolling back jitsu@0.9.8 Error: ENOTEMPTY, rmdir '/var/lib/stickshift/9b2d343164844a09a1e9f4ccc903fee7/app-root/data/lib/node_modules/jitsu/node_modules/npm/html/api'
npm ERR! Error: No compatible version found: read@'>=1.0.0- <1.1.0-'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.2","0.0.3","0.1.0","0.1.1"]
npm ERR! at installTargetsError (/usr/lib/node_modules/npm/lib/cache.js:496:10)
npm ERR! at next_ (/usr/lib/node_modules/npm/lib/cache.js:446:17)
npm ERR! at next (/usr/lib/node_modules/npm/lib/cache.js:423:44)
npm ERR! at /usr/lib/node_modules/npm/lib/cache.js:416:5
npm ERR! at saved (/usr/lib/node_modules/npm/lib/utils/npm-registry-client/get.js:151:7)
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: socket hang up
error: at createHangUpError (http.js:1264:15)
error: at Socket.socketOnEnd (http.js:1352:23)
error: at TCP.onread (net.js:418:26)
help: For help with this error contact Nodejitsu Support:
help: webchat: <http://webchat.nodejitsu.com/>
help: irc: <irc://chat.freenode.net/#nodejitsu>
[jfstgermain@cloud9]:/workspace$ jitsu deploy
info: Welcome to Nodejitsu creatix
info: jitsu v0.9.8
info: jitsu v0.9.8
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in app-compiled/server.js
Completed executing coffee
warn: Local package version appears to be old
warn: The package.json version will be incremented automatically
jfstgermain@meatme:~/276715 (master) $ du -skh * | sort -n
0 README
1.3M build
4.0K Cakefile
4.0K database.json
[jfstgermain@cloud9]:/workspace$ jitsu deploy
info: Welcome to Nodejitsu creatix
info: jitsu v0.10.3-1, node v0.6.21
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in app-compiled/server.js
Completed executing coffee
Completed executing coffee
info: Creating snapshot 0.0.0-50
readline.js:58
info: Creating snapshot 0.0.0-54
info: Creating snapshot 0.0.0-54
info: Updating app meatme
info: Activating snapshot 0.0.0-54 for meatme
info: Starting app meatme
error: Error running command deploy
error: Error running command deploy
error: socket hang up
help: For help with this error contact Nodejitsu Support:
help: webchat: <http://webchat.nodejitsu.com/>
info: Creating snapshot 0.0.0-71
info Uploading: [============================ ] 96%
info: Updating app meatme
info: Activating snapshot 0.0.0-71 for meatme
info: Starting app meatme

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@jfstgermain
jfstgermain / System Design.md
Created April 18, 2016 20:36 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?