start new:
tmux
start new with session name:
tmux new -s myname
| 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 |
| #------------------------------------------------------------------------ | |
| # encoding: utf-8 | |
| # @(#)product_generator.rb 1.00 29-Nov-2011 16:38 | |
| # | |
| # Copyright (c) 2011 Jim Pravetz. All Rights Reserved. | |
| # Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) | |
| # | |
| # Description: A generator that creates product, products and | |
| # ingredients pages for jekyll sites. Uses a JSON data | |
| # file as the database file from which to read and |
| #!/bin/bash | |
| # A simple script to backup an organization's GitHub repositories. | |
| #------------------------------------------------------------------------------- | |
| # NOTES: | |
| #------------------------------------------------------------------------------- | |
| # * User @jimklimov (and probably some others called out in the long comment | |
| # thread below) have modified this script to make it more robust and keep | |
| # up with various changes in the GitHub API and response format at: | |
| # https://github.com/jimklimov/github-scripts |
| # Outputs the reading time | |
| # Read this in “about 4 minutes” | |
| # Put into your _plugins dir in your Jekyll site | |
| # Usage: Read this in about {{ page.content | reading_time }} | |
| module ReadingTimeFilter | |
| def reading_time( input ) | |
| words_per_minute = 180 |
| module.exports = { | |
| 'A lot of screenshots': function (test) { | |
| var resolutions = [{width: 1280, height: 1024}, {width: 1024, height: 768}, {width: 800, height: 600}]; | |
| var pages = ['http://facebook.com', 'http://twitter.com', 'http://dalekjs.com']; | |
| resolutions.forEach(function (res) { | |
| pages.forEach(function (page) { | |
| test.open(page) | |
| .resize(res) |
| angular.module('setRepeat',[]).directive('setRepeat', function () { | |
| return { | |
| transclude: 'element', | |
| priority: 1000, | |
| compile: compileFun | |
| }; | |
| function compileFun(element, attrs, linker) { | |
| var expression = attrs.setRepeat.split(' in '); |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.