This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set expandtab | |
| set hidden | |
| set incsearch | |
| set noshowmatch | |
| set showcmd | |
| set smartcase | |
| set smarttab | |
| set sw=4 | |
| set ts=4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > JSON.stringify({aList: '\tthing1\n\tthing2\n'}) | |
| "{"aList":"\tthing1\n\tthing2\n"}" | |
| > JSON.parse('{"aList":"\tthing1\n\tthing2\n"}') | |
| ▼ SyntaxError: Unexpected token | |
| ▶ arguments: Array[1] | |
| ▶ get message: function getter() { [native code] } | |
| ▶ get stack: function getter() { [native code] } | |
| ▶ set message: function setter() { [native code] } | |
| ▶ set stack: function setter() { [native code] } | |
| type: "unexpected_token" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // from K&R section 4.3 | |
| #include <stdio.h> | |
| #include <stdlib.h> // for atof() | |
| #include <ctype.h> | |
| #define MAXOP 100 // max size of operand | |
| #define NUMBER '0' // signal that a number was found | |
| #define MAXVAL 100 // max depth of value stack | |
| #define BUFSIZE 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs') | |
| // kernel | |
| var kernel = require('kernel') | |
| kernel('t2.html', function(err, tmpl) { | |
| if (err) throw err | |
| tmpl({ | |
| title: function(cb) { | |
| fs.readFile('bob', cb) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mount -v /backup | |
| rsync -vaxE --delete --ignore-errors / /backup/ | |
| umount -v /backup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # See http://www.mikerubel.org/computers/rsync_snapshots/ | |
| # SRC is the source, e.g. sally:/mnt/mirror/ | |
| SRC="$1:$2" | |
| # BAK is the path to the backup dir, e.g. /var/backups/sally/backup | |
| BAK="/var/backups/$1/backup" | |
| # don't do anything if no ssh connection |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var exec = require('child_process').exec; | |
| var http = require('http'); | |
| var querystring = require('querystring'); | |
| var url = require('url'); | |
| var port = process.argv[2] || 8751; | |
| http.createServer(function(request, response) { | |
| var url_parts = url.parse(request.url); | |
| if (url_parts.pathname == '/') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name aarseth; | |
| root /home/gsf/svn/waytohealth/meta/web; | |
| # For passing along to a static site | |
| location ^~ /a/ { | |
| alias /home/gsf/git/Apprenticeship; | |
| } |