start new:
tmux
start new with session name:
tmux new -s myname
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
/* | |
* helpers.js: Test macros for APIeasy. | |
* | |
* (C) 2011, Charlie Robbins | |
* | |
*/ | |
var assert = require('assert'), | |
http = require('http'), | |
journey = require('journey'); |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
// WITHOUT PROMISES: | |
tests: [ | |
{ | |
desc: "My async test", | |
run: function(env) { | |
var _this = this; | |
doSomethingThatReturnsAPromise(). | |
then( |
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).
Byobu Commands | |
============== | |
byobu Screen manager | |
Level 0 Commands (Quick Start) | |
------------------------------ | |
<F2> Create a new window |
#!/bin/bash | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then | |
exit 0 |
Prerequisites:
Software components used:
#!/bin/bash | |
set -e | |
function printUsage() { | |
echo -e USAGE="\nUsage: $0 ip_address delay_in_ms percentage_of_packet_loss \nor\nUsage: $0 reset\n" | |
} | |
if [ "$#" == "0" ] || [ "$#" == "1" ] && [ "$1" != "reset" ] || [ "$1" != "reset" ] && [ "$#" -ne 3 ]; then | |
printUsage |