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
@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
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
import Ember from 'ember';
export default Ember.Route.extend({
model() {
return this.store.findAll('entry');
},
isExpanded: false,
actions: {
expand() {
this.controller.set('isExpanded', true);
"""""""""""""""""""""""""""""""""""""
" Allan MacGregor Vimrc configuration
"""""""""""""""""""""""""""""""""""""
set nocompatible
syntax on
set nowrap
"""" START Vundle Configuration
" Disable file type for vundle
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
<?php
namespace Goose\Modules\Formatters;
use Goose\Article;
use Goose\Traits\NodeCommonTrait;
use Goose\Traits\NodeGravityTrait;
use Goose\Traits\ArticleMutatorTrait;
use Goose\Modules\AbstractModule;
use Goose\Modules\ModuleInterface;
@amacgregor
amacgregor / composer.json
Created March 31, 2015 09:31
Composer file for robot-name exercise
{
"name": "amacgregor/robot-name",
"authors": [
{
"name": "Allan MacGregor",
"email": "amacgregor@allanmacgregor.com"
}
],
"require": {
"icomefromthenet/reverse-regex" : "dev-master"
# Rna Transcription
Write a program that, given a DNA strand, returns its RNA complement (per RNA transcription).
Both DNA and RNA strands are a sequence of nucleotides.
The four nucleotides found in DNA are adenine (**A**), cytosine (**C**),
guanine (**G**) and thymine (**T**).
The four nucleotides found in RNA are adenine (**A**), cytosine (**C**),
grep -r "global/crypt/key" .
docker run -v /home/amacgregor/Projects/DemacMedia/demac-docker-example/public:/srv/www/localhost.com/public_html
-p 127.0.0.1:80:80 -t -i amacgregor/localhost_com