Skip to content

Instantly share code, notes, and snippets.

:shipit:
Working on Side Projects

Allan MacGregor amacgregor

:shipit:
Working on Side Projects
View GitHub Profile
View Effective_Engineer.md

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

View Effective_Engineer.md

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@amacgregor
amacgregor / dump-subset-of-magento-orders-and-customer-data.php Proof of concept of script that does mysql dump of subset of Magento orders + related sales tables and customer's data of customer that did the orders. The script also attempts to import the data in local database. Currently the script gets last 1000 orders and customers data of customers that created the orders. Data anonymization is not implem…
View dump-subset-of-magento-orders-and-customer-data.php
<?php
$mysqlCommandPath = 'to be filled';
$mysqldumptCommandPath = 'to be filled';
$remoteDbUnsername = 'to be filled';
$remoteDbPassword = 'to be filled';
$remotePort = 'to be filled';
$remotHost = 'to be filled';
$remoteDb = 'to be filled';
@amacgregor
amacgregor / Dockerfile
Created May 15, 2016 — forked from yefim/Dockerfile
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
View Dockerfile
# Example Dockerfile
FROM hello-world
View elk-magento-exception
input {
file {
type => "magento-exception"
path => "/path/to/magento/www/var/log/exception.log"
codec => multiline {
pattern => "^%{TIMESTAMP_ISO8601}"
negate => true
what => previous
}
}
View hubot-digitalocean.md
View node-chrome
var express = require('express');
var cp = require('child_process');
var app = express.createServer();
var chrome_count = 0;
app.get('/', function(req, res){
startChrome(chrome_count++,9222,function chromeStared(err,id,chrome){
res.send('Chrome '+id+' Started\r\n');
View elixirsips_downloader.rb
require 'httparty'
require 'nokogiri'
USERNAME = "email-used@in-registration.com"
PASSWORD = "your-password-here"
COOKIE_FILE = 'cookies.txt' # by example
class ElixirsipsDownloader
FEED_URL = "https://elixirsips.dpdcart.com/feed"
LOGIN_URL = "http://elixirsips.dpdcart.com/subscriber/content"
View bootstrap.php
<?php
/**
* Simple Magento integration test PHPUnit bootstrap
*/
chdir(__DIR__ . '/../..');
$mageFile = 'htdocs/app/Mage.php';
umask(0);
View gist:9415727
var CreditCard = {
CARDS: {
Visa: /^4[0-9]{12}(?:[0-9]{3})?$/,
MasterCard: /^5[1-5][0-9]{14}$/,
DinersClub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,
Amex: /^3[47][0-9]{13}$/,
Discover: /^6(?:011|5[0-9]{2})[0-9]{12}$/
},
TEST_NUMBERS: $w('378282246310005 371449635398431 378734493671000 '+
'30569309025904 38520000023237 6011111111111117 '+
You can’t perform that action at this time.