This is now an actual repo:
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
The following instructions will install Vim with the Ruby interpreter and Command-T. I keep my vim settings under revision control, thus I have chosen to use Git's submodules and Pathogen to manage Command-T. Depending on your preferences, you may want to setup Command-T differently. I recommend reading through the Command-T Readme
sudo apt-get install ruby ruby-dev libncurses5-dev mercurial clone build-essential rake
I chose to compile vim with my system Ruby, 1.8.7. It is important that you use the same version to compile both Vim and Command-T. If your using RVM and you want to do the same, before proceeding you will want to:
rvm use system
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
* Tip: http://pivotallabs.com/users/jdean/blog/articles/1400-working-with-asynchronously-loaded-javascript | |
*/ | |
(function(doc, script) { | |
var js, |
// NOTE: only escapes a " if it's not already escaped | |
function escapeDoubleQuotes(str) { | |
return str.replace(/\\([\s\S])|(")/g,"\\$1$2"); // thanks @slevithan! | |
} | |
escapeDoubleQuotes(`ab`); // ab => ab (nothing escaped) | |
escapeDoubleQuotes(`a"b`); // a"b => a\"b | |
escapeDoubleQuotes(`a\\"b`); // a\"b => a\"b (nothing escaped) | |
escapeDoubleQuotes(`a\\\\"b`); // a\\"b => a\\\"b | |
escapeDoubleQuotes(`a\\\\\\"b`); // a\\\"b => a\\\"b (nothing escaped) |
@font-face { | |
font-family: 'EntypoRegular'; | |
src: url('font/entypo.eot'); | |
src: url('font/entypo.eot?#iefix') format('embedded-opentype'), | |
url('font/entypo.woff') format('woff'), | |
url('font/entypo.ttf') format('truetype'), | |
url('font/entypo.svg#EntypoRegular') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
(function() { | |
var script, | |
scripts = document.getElementsByTagName('script')[0]; | |
function load(url) { | |
script = document.createElement('script'); | |
script.async = true; | |
script.src = url; | |
scripts.parentNode.insertBefore(script, scripts); |
<?xml version="1.0" encoding="UTF-8"?> | |
<toolSet name="Yeoman[ng]"> | |
<tool name="Create Route" description="Generates a controller and view, and configures a route in app/scripts/app.js connecting them." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="yo" /> | |
<option name="PARAMETERS" value="angular:route $Prompt$" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" /> | |
</exec> | |
</tool> | |
<tool name="Create Controller" description="Generates a controller in app/scripts/controllers." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true"> |
- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers