sudo yum -y update
I'm not a big fan of their default bash prompt:
echo "export PS1='[\D{%F %T}]\n\[\e]0;\w\a\]\[\e[32m\]\u:\[\e[33m\]\w\[\e[0m\]\n\$ '" >> ~/.bashrc
source ~/.bashrc
| const AWS = require("aws-sdk"); // from AWS SDK | |
| const fs = require("fs"); // from node.js | |
| const path = require("path"); // from node.js | |
| // configuration | |
| const config = { | |
| s3BucketName: 'your.s3.bucket.name', | |
| folderPath: '../dist' // path relative script's location | |
| }; |
| const AWS = require("aws-sdk"); // from AWS SDK | |
| const fs = require("fs"); // from node.js | |
| const path = require("path"); // from node.js | |
| // configuration | |
| const config = { | |
| s3BucketName: 'your.s3.bucket.name', | |
| folderPath: '../dist' // path relative script's location | |
| }; |
| #!/bin/bash | |
| # Script to backup git repo to Backblaze B2 | |
| # Set bucket, dir, password and account to use for the backup. I keep mine in local env vars | |
| # These are set by localrc which lives on an encrypted home directory and is executed by my bashrc | |
| # Ensure you have authorized the B2 command line tool with the correct account AND added your SSH | |
| # public key to your github account, if you need to backup private repositories. | |
| # To restore this repo in the future, download it from B2, extract it and then use this command: | |
| # cd old-repository.git |
| #!/bin/bash | |
| # Script to backup git repo to Backblaze B2 | |
| # Set bucket, dir, password and account to use for the backup. I keep mine in local env vars | |
| # These are set by localrc which lives on an encrypted home directory and is executed by my bashrc | |
| # Ensure you have authorized the B2 command line tool with the correct account AND added your SSH | |
| # public key to your github account, if you need to backup private repositories. | |
| # To restore this repo in the future, download it from B2, extract it and then use this command: | |
| # cd old-repository.git |
| #!/bin/sh | |
| receipts() { | |
| find /private/var/db/receipts -iregex '.*/org\.insecure\.nmap.*' | |
| } | |
| bom_files() { | |
| receipts | grep '\.bom$' | |
| } |
| // Because "hit enter as fast as you can" | |
| /* | |
| 1. Requires serialport module (npm install serialport) | |
| 2. Run with node (node t2_log_boot.js) | |
| 3. Plug in tessel2. | |
| */ | |
| /* Figure out what port your tessel2 is plugged into and update the SERIAL_PORT variable. */ | |
| const SERIAL_PORT = '/dev/cu.usbmodem1412'; |
Upgrading to Lion or Yosemite and WebStorm 9, I noticed key repeat was
turned off for the IdeaVim plugin h j k l keys.
defaults write -g ApplePressAndHoldEnabled -bool false in a terminal will enable
key repeat for every app. This can alternatively be found in the accessibility
settings in OS X' preferences.
| // Restify Server CheatSheet. | |
| // More about the API: http://mcavage.me/node-restify/#server-api | |
| // Install restify with npm install restify | |
| // 1.1. Creating a Server. | |
| // http://mcavage.me/node-restify/#Creating-a-Server | |
| var restify = require('restify'); |