Skip to content

Instantly share code, notes, and snippets.

View augiedb's full-sized avatar

Augie De Blieck Jr. augiedb

View GitHub Profile
@bbaaxx
bbaaxx / Vagrantfile
Last active October 21, 2018 11:12
Vagrantfile for a cheap ember-cli box (with NVM)
# -*- mode: ruby -*-
# vi: set ft=ruby :
box = 'ubuntu/trusty64'
hostname = 'emberclibox'
domain = 'example.com'
ip = '192.168.42.42'
ram = '512'
$rootScript = <<SCRIPT
@ToJans
ToJans / threes.exs
Last active August 29, 2015 13:57
An implementation in Elixir for Threes (http://asherv.com/threes/). Started out of curiosity after seeing a tweet by GraemeF(https://twitter.com/GraemeF/status/442580143140134912)
defmodule Threes do
def right(board) do
board
|> Enum.map(&pack/1)
end
def left(board) do
board
|> Enum.map(&reverse_pack/1)
@fredhsu
fredhsu / ssh-router.exs
Last active January 29, 2016 02:40
SSH to router using Elixir
:ssh.start
{:ok, cref} = :ssh.connect('10.55.3.1', 22, [{:user, 'user'}, {:password, 'password'}])
{:ok, cid} = :ssh_connection.session_channel(cref, 5000)
:ssh_connection.exec(cref, cid, String.to_char_list("show ver | xml | no-more"), 3000)
#:ssh_connection.exec(cref, cid, String.to_char_list("show core"), 3000)
# need to do a receive on the cref(pid)
#flush() -- useful to find out what the result will look like
receive do
{:ssh_cm, _, {:data, _, _, d}} -> IO.puts d
end
@joelverhagen
joelverhagen / README.md
Created February 12, 2012 02:14
Jekyll YouTube Embed Plugin

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}