This file contains 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
export MAGE_FIRST_NAME="Peter" | |
export MAGE_LAST_NAME="Pan" | |
export MAGE_USERNAME="peter.pan" | |
export MAGE_PASS="topsecret1234" | |
make query QUERY="INSERT INTO admin_user SELECT NULL user_id, '$MAGE_FIRST_NAME' firstname, '$MAGE_LAST_NAME' lastname, '[email protected]' email, '$MAGE_USERNAME' username, MD5('$MAGE_PASS') password, NOW() created, NULL modified, NULL logdate, 0 lognum, 0 reload_acl_flag, 1 is_active, NULL extra, NULL rp_token, NOW() rp_token_created_at;" | |
make query QUERY="INSERT INTO admin_role SELECT NULL role_id, (SELECT role_id FROM admin_role WHERE role_name = 'Administrators') parent_id, 2 tree_level, 0 sort_order, 'U' role_type, (SELECT user_id FROM admin_user WHERE username = '$MAGE_USERNAME') user_id, '$MAGE_USERNAME' role_name;" |
This file contains 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
#!/usr/bin/env python3 | |
import dateutil.parser, dateutil.tz, datetime, json, os, sys, boto3, stat | |
from subprocess import Popen, PIPE | |
# Get the profile, first argument on the command line | |
if (len(sys.argv) < 2): | |
raise Exception('Profile name not specified on command line') | |
profile = sys.argv[1] |
This file contains 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
#!/usr/bin/env bash | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Some apps don't have a cask and so still need to be installed by hand. These | |
# include: | |
# | |
# - Twitter (app store) |
This file contains 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
it('should refuse partial submissions', function(done) { | |
var browser = this.browser; | |
browser.fill('first_name', 'John'); | |
browser.pressButton('Send').then(function() { | |
assert.ok(browser.success); | |
assert.equal(browser.text('h1'), 'Contact'); | |
assert.equal(browser.text('div.alert'), 'Please fill in all the fields'); | |
}).then(done, done); | |
}); |
use phpFastCache\CacheManager;
$cache = CacheManager::Memcached();
// try to get from Cache first.
$resultsItem = $cache->getItem("identity_keyword")
if(!$resultsItem->isHit()) {
$resultsItem->set($cURL->get("http://www.youtube.com/api/json/url/keyword/page"))->expireAfter(3600*24);
Open a new terminal and install Composer:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Once that has finished installing and moved, install the PHP-CS-Fixer Composer package globally:
NewerOlder