Skip to content

Instantly share code, notes, and snippets.

View amacgregor's full-sized avatar
:shipit:
Working on Side Projects

Allan MacGregor amacgregor

:shipit:
Working on Side Projects
View GitHub Profile
iptables -t nat -A PREROUTING -p tcp -d 192.168.99.100 --destination-port 3306 -j DNAT --to-destination 192.168.99.1:3306
iptables -t nat -A POSTROUTING -p tcp -d 192.168.99.1 --destination-port 3306 -j SNAT --to-source 192.168.99.100
"""""""""""""""""""""""""""""""""""""
" Allan MacGregor Vimrc configuration
"""""""""""""""""""""""""""""""""""""
set nocompatible
syntax on
set nowrap
"""" START Vundle Configuration
" Disable file type for vundle
import Ember from 'ember';
export default Ember.Route.extend({
model() {
return this.store.findAll('entry');
},
isExpanded: false,
actions: {
expand() {
this.controller.set('isExpanded', true);
defmodule ListOps do
# Please don't use any external modules (especially List) in your
# implementation. The point of this exercise is to create these basic functions
# yourself.
#
# Note that `++` is a function from an external module (Kernel, which is
# automatically imported) and so shouldn't be used either.
@doc """
Sums all the values inside the provided list
@doc """
Sums all the values inside the provided list
"""
@spec count(list) :: non_neg_integer
def count([]), do: 0
def count([_|tail]) do
count(tail) + 1
end

Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to evaluating contributions within project channels (such as reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other project activities) without regard to the contributor's level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, politics, or activity outside of project channels.

The following are considered the official project channels:

  • PHP Mailing list
  • PHP Official IRC Channel
<?php
/**
* Catalog navigation
*
* @category Mage
* @package Mage_Catalog
* @author Magento Core Team <[email protected]>
*/
class Mage_Catalog_Block_Navigation extends Mage_Core_Block_Template
{
@amacgregor
amacgregor / .vimrc
Created April 13, 2016 15:41
Personal Vimrc file
"""""""""""""""""""""""""""""""""""""
" Allan MacGregor Vimrc configuration
"""""""""""""""""""""""""""""""""""""
set nocompatible
syntax on
set nowrap
"""" START Vundle Configuration
" Disable file type for vundle
@amacgregor
amacgregor / Dockerfile
Created May 15, 2016 11:21 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
# Example Dockerfile
FROM hello-world
from numpy import exp, array, random, dot