Scripts to set up and use your Yubikey with PGP applet to authenticate to a SSH server.
Based on instructions from: http://forum.yubico.com/viewtopic.php?f=26&t=1171
Requires GPGTools on OSX (rather than the homebrew gpg) from: https://gpgtools.org/
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 semver = require('semver'); | |
| function update() { | |
| var child = exec('git describe --dirty', function (error, stdout, stderr) { | |
| exports.string = stdout.replace('\n', '').replace('\r', ''); | |
| if(error) { |
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
| exports.compareArrays = function(one, two) { | |
| assert.equal(one.length, two.length); | |
| for(var i in one) { | |
| for(var j in one[i]) { | |
| assert.equal(one[i][j], two[i][j]); | |
| } | |
| for(var j in two[i]) { | |
| assert.equal(one[i][j], two[i][j]); |
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 winston = require('winston'); | |
| var compressjs = require('compressjs'); | |
| var algorithm = compressjs.Bzip2; | |
| exports.compressString = function(string) { | |
| var bufferedString = new Buffer(string, 'utf8'); | |
| var compressedString = algorithm.compressFile(bufferedString); | |
| var encodedString = new Buffer(compressedString).toString('base64'); | |
| return encodedString; | |
| } |
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
| //Grabs the version from package.json to use in your application | |
| var semver = require('semver'); | |
| var pkg = require('../package.json'); | |
| module.exports = { | |
| string: pkg.version, | |
| clean: semver.clean(pkg.version), | |
| major: semver.major(pkg.version), | |
| minor: semver.minor(pkg.version), |
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'); | |
| if(!process.argv[3]) { | |
| console.log("directory argument required"); | |
| process.exit(0); | |
| } | |
| var dir = process.argv[3]; | |
| var files = fs.readdirSync(dir); |
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/bash | |
| # Immutable Project-Local Toolchain Setup | |
| # Inspired by Python's virtualenv and npm | |
| # See http://wp.me/pZZvH-an for more | |
| # Run with `source ./armenv.sh` | |
| # TODOs: | |
| # Add upgrade option | |
| # Cleaner toolchain versioning | |
| # Detect different toolchain versions and warn if installing new? |
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
| class GccArmNoneEabi < Formula | |
| homepage "https://launchpad.net/gcc-arm-embedded/" | |
| version "4.9-2015-q1" | |
| url "https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q1-update/+download/gcc-arm-none-eabi-4_9-2015q1-20150306-mac.tar.bz2" | |
| sha1 "da07fd4edc09da8748b3a61252eed793059c138f" | |
| revision 1 | |
| def install | |
| binaries = [ |
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/bash | |
| # Setup a project local environment for a nodejs project | |
| # This installs and links a local node instances so that node and application versions can be coupled. | |
| # Installation is both local to the project, and does not require superuser permissions. | |
| # Inspired by Python's virtualenv. For more information, see http://wp.me/pZZvH-an | |
| # | |
| # Usage: | |
| # 1. Add this file to your node project | |
| # 2. Run with `source ./setup.sh` to setup a local node.js instance | |
| # |
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/bash | |
| ### BEGIN INIT INFO | |
| # Provides: [APP_NAME_HERE] | |
| # Required-Start: $remote_fs $syslog | |
| # Required-Stop: $remote_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Forever running [APP_NAME_HERE] | |
| # Description: Forever running [APP_NAME_HERE] | |
| ### END INIT INFO |