a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
| ######################### | |
| ### Set a remote repo ### | |
| ######################### | |
| # via ssh | |
| > mkdir projectdir.git | |
| > cd projectdir.git | |
| > git init --bare | |
| or use http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way |
| require.registerExtension('.js', function(js){ | |
| return js.replace(/^ *\/\/debug: */gm, ''); | |
| }); |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
| Copyright (c) 2011 Tom Robinson, http://tlrobinson.net/ | |
| Permission is hereby granted, free of charge, to any person obtaining | |
| a copy of this software and associated documentation files (the | |
| "Software"), to deal in the Software without restriction, including | |
| without limitation the rights to use, copy, modify, merge, publish, | |
| distribute, sublicense, and/or sell copies of the Software, and to | |
| permit persons to whom the Software is furnished to do so, subject to | |
| the following conditions: | |
| function levenshtein(s1, s2) { | |
| // http://kevin.vanzonneveld.net | |
| // + original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com) | |
| // + bugfixed by: Onno Marsman | |
| // + revised by: Andrea Giammarchi (http://webreflection.blogspot.com) | |
| // + reimplemented by: Brett Zamir (http://brett-zamir.me) | |
| // + reimplemented by: Alexander M Beedie | |
| // * example 1: levenshtein('Kevin van Zonneveld', 'Kevin van Sommeveld'); | |
| // * returns 1: 3 |
| /** | |
| * encode to handle invalid UTF | |
| * | |
| * If Chrome tells you "Could not decode a text frame as UTF-8" when you try sending | |
| * data from nodejs, try using these functions to encode/decode your JSON objects. | |
| * | |
| * see discussion here: http://code.google.com/p/v8/issues/detail?id=761#c8 | |
| * see also, for browsers that don't have native JSON: https://github.com/douglascrockford/JSON-js | |
| * | |
| * Any time you need to send data between client and server (or vice versa), encode before sending, |
git checkout stash@{0} -- .
This will potentially overwrite uncommitted files so you may lose work.
Via https://www.vincentschmalbach.com/applying-git-stash-changes-with-force/
git config --global alias.alias "! git config --get-regexp ^alias. | sed -e s/^alias.// -e s/\ /\ =\ /"
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| 01. `apt-get install git` | |
| 02. `adduser git` | |
| 03. `visudo` add `git ALL=(ALL:ALL) NOPASSWD: ALL` to user privilege specification | |
| 04. `login git` | |
| 05. `ssh-keygen -t rsa` | |
| 06. `mkdir project` | |
| 07. `mkdir project.git` | |
| 08. `cd project.git` | |
| 09. `git init --bare` | |
| 10. `cd hooks` |
| /* ******************************************************************************************* | |
| * THE UPDATED VERSION IS AVAILABLE AT | |
| * https://github.com/LeCoupa/awesome-cheatsheets | |
| * ******************************************************************************************* */ | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |