This file contains hidden or 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
@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 |
This file contains hidden or 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
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 |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
model() { | |
return this.store.findAll('entry'); | |
}, | |
isExpanded: false, | |
actions: { | |
expand() { | |
this.controller.set('isExpanded', true); |
This file contains hidden or 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
""""""""""""""""""""""""""""""""""""" | |
" Allan MacGregor Vimrc configuration | |
""""""""""""""""""""""""""""""""""""" | |
set nocompatible | |
syntax on | |
set nowrap | |
"""" START Vundle Configuration | |
" Disable file type for vundle |
This file contains hidden or 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
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 |
This file contains hidden or 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
<?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; |
This file contains hidden or 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
{ | |
"name": "amacgregor/robot-name", | |
"authors": [ | |
{ | |
"name": "Allan MacGregor", | |
"email": "[email protected]" | |
} | |
], | |
"require": { | |
"icomefromthenet/reverse-regex" : "dev-master" |
This file contains hidden or 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
# 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**), |
This file contains hidden or 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
grep -r "global/crypt/key" . |
This file contains hidden or 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
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 |