Skip to content

Instantly share code, notes, and snippets.

View danielevans's full-sized avatar

Daniel Evans danielevans

  • Anfract
  • Portland, OR
View GitHub Profile
@danielevans
danielevans / gist:cb82c4ca5d45fd55fb091a9d45458ee6
Created May 12, 2016 23:15 — forked from eduardocardoso/gist:82a629882ddb02ab3677
Script to delete exited containers and untagged/unused images from docker
#!/bin/bash
set -o errexit
echo "Removing exited docker containers..."
docker ps -a -f status=exited -q | xargs -r docker rm -v
echo "Removing dangling images..."
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi
@danielevans
danielevans / LPSN_parcer.rb
Last active January 1, 2016 22:11 — forked from jrslagle/LPSN_parcer.rb
a script to parse bacterial phylogeny from http://www.bacterio.net/-classifphyla.html and print it into a table format.
# original text is from http://www.bacterio.net/-classifphyla.html
# load hard-coded filename LPSN.txt into a string
# create a File object from LPSN.txt
line_array = File.readlines("LPSN.txt") or die "LPSN.txt not found."
# todo: parse lines your own way if it helps separate genuses.
# todo: grab this data directly from the website
# use the included date to report how old the current genus table is
# phylum = "no phylum"
# simple sinatra auth
use Rack::Auth::Basic, "Restricted Area" do |username, password|
{
"admin1" => "password1",
"admin2" => "password2"
}[username] == password
end
#TODO use Faker
FactoryGirl.define do
factory :user do
account
sequence :email do |n|
"user_#{n}@example.com"
end
first_name 'John'
$(document).ready(function(){
var r=function(e){
alert("Hello World");
};
$("#remove").click(r);
});