Skip to content

Instantly share code, notes, and snippets.

@robwilkerson
robwilkerson / vagrant-provision-php.ini.sh
Created November 5, 2013 01:54
Modify php.ini to turn on errors for debugging and disable the short open tag.
# Show PHP errors
sed -i -r -e 's/short_open_tag = On/short_open_tag = Off/g' /etc/php5/fpm/php.ini
sed -i -r -e 's/error_reporting = E_ALL & ~E_DEPRECATED/error_reporting = E_ALL | E_STRICT/g' /etc/php5/fpm/php.ini
sed -i -r -e 's/display_errors = Off/display_errors = On/g' /etc/php5/fpm/php.ini
#/usr/bin/env bash
# Move the downloaded zip to the evaluating directory
download=$(find ~/Desktop -regex '.*/[0-9]\{6,\}\.zip')
zip=$(basename "$download")
candidate=${zip%.*}
echo $download
echo $zip
echo $candidate
#/usr/bin/env bash
# Move the downloaded zip to the evaluating directory
download=$(find ~/Desktop -regex '.*/[0-9]\{6,\}\.zip')
zip=$(basename "$download")
homework=${zip%.*}
echo "Download: $download"
echo "Zip: $zip"
echo "Homework: $homework"
#/usr/bin/env bash
# execute as ./grade.sh
# Assumes homework submission was downloaded to your Desktop as <homework_id>.zip
# Unzips to ./<homework_id>
# rsync's to homeworkgrading.com
# opens an ssh connection to homeworkgrading.com in the terminal window
# launches VSCode
# Move the downloaded zip to the evaluating directory
$ yarn install 0s
yarn install v1.16.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning " > @cmsgov/design-system-core@1.30.3" has unmet peer dependency "prop-types@^15.0.0 || ^16.0.0".
warning "@cmsgov/design-system-core > downshift@1.31.16" has unmet peer dependency "prop-types@>=15".
warning "@cmsgov/medicare-site-package > @cmsgov/design-system-core@1.31.1" has unmet peer dependency "prop-types@^15.0.0 || ^16.0.0".
warning "html-react-parser > react-dom-core@0.0.3" has unmet peer dependency "fbjs@*".
warning "html-react-parser > react-dom-core@0.0.3" has unmet peer dependency "object-assign@*".
@robwilkerson
robwilkerson / install-db.sh
Created June 25, 2013 16:24
Creates and populates a local (Vagrant) database from a remote production source database.
echo "--> Creating a fresh database..."
mysql -uroot --execute "DROP DATABASE IF EXISTS <db_name>; CREATE DATABASE <db_name> CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
echo "<-- Complete."
echo "--> Configuring SSH access to production resources for `id -un`..."
mkdir ~/.ssh
cp /vagrant/.ssh/<name>.pem ~/.ssh
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
SSH_OPTIONS=''
@robwilkerson
robwilkerson / okta-info.js
Created April 10, 2017 18:31
The stages of what I'm seeing
// response body from calling /login
{
"message":"Credentials verified. Please send MFA request.",
"data":{
"factors":{
"1f7973e8-0f06-417a-b040-2ad0c863d20c":{
"id":"1f7973e8-0f06-417a-b040-2ad0c863d20c","type":"call","profile":{"phoneNumber":"+1 XXX-XXX-1069"}
},
"b43ac673-464a-4f07-9e2a-024351e247f9":{
"id":"b43ac673-464a-4f07-9e2a-024351e247f9","type":"sms","profile":{"phoneNumber":"+1 XXX-XXX-1069"}

Keybase proof

I hereby claim:

  • I am robwilkerson on github.
  • I am robwilkerson (https://keybase.io/robwilkerson) on keybase.
  • I have a public key whose fingerprint is E067 9599 5EC2 5788 A626 40AB 1EBE 7ECC E88F 3AC9

To claim this, I am signing this object:

@robwilkerson
robwilkerson / test-output
Created April 18, 2016 12:57
mocha-eslint test fails
$ npm test 2s
> mocha-eslint@2.0.2 test /Users/robwilkerson/Development/npm/mocha-eslint
> node tests/runner
Acceptance: mocha-eslint
1) should pass test for lintSucceed.js
2) should fail test for lintFail.js
@robwilkerson
robwilkerson / fixtures.js
Created April 5, 2016 11:28
A simple integration test file
'use strict';
let Promise = require('bluebird');
let db = require('../config/knexfile')[process.env.NODE_ENV];
let knex = require('knex')(db);
/**
* Loads fixture data. Expects fixture data to be exported by a file in the
* ./fixtures/ directory (e.g. ./fixtures/users.js).