Skip to content

Instantly share code, notes, and snippets.

Avatar

Neil Millard neilmillard

View GitHub Profile
@neilmillard
neilmillard / cleanup.sh
Last active Jun 13, 2018 — forked from paulrobello/cleanup.sh
Docker registry v2 cleanup script
View cleanup.sh
#!/bin/bash
### your registry must have the following environment var set
# REGISTRY_STORAGE_DELETE_ENABLED=true
### replace YOUR_SERVER with corect info
REGISTRY_URL=https://YOUR_SERVER:5000
### host registry volume folder
REGISTRY_ROOT=/registry
### container to execute garbage-collect
CONTAINER_NAME=services_registry.1
@neilmillard
neilmillard / gist:b7439875ff45c0a12586b29b03239921
Created May 15, 2016 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions with vagrant
View gist:b7439875ff45c0a12586b29b03239921
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@neilmillard
neilmillard / update-route53-dns.sh
Last active Jan 6, 2016 — forked from dfox/update-route53-dns.sh
A script to update DNS on Route 53
View update-route53-dns.sh
#!/bin/sh
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# Defaults
TTL=60
@neilmillard
neilmillard / aws-dns-route53-dig.md
Created Jan 6, 2016 — forked from diegopacheco/aws-dns-route53-dig.md
AWS Route53 Fun with DNS: dig & cli53
View aws-dns-route53-dig.md

How to Install on CentOs?

sudo yum install -y bind-utils
pip install cli53

Figureout the box name?

@neilmillard
neilmillard / user-data.sh
Created Oct 19, 2015 — forked from codeinthehole/user-data.sh
Get the value of an EC2 instance's tag
View user-data.sh
#!/usr/bin/env bash
#
# Get the value of a tag for a running EC2 instance.
#
# This can be useful within bootstrapping scripts ("user-data").
#
# Note the EC3 instance needs to have an IAM role that lets it read tags. The policy
# JSON for this looks like:
#
# {
@neilmillard
neilmillard / ruby_centos6.sh
Last active Aug 29, 2015 — forked from doole/ruby_centos6.sh
Ruby/Rails setup on CentOS 6.x with Vagrant
View ruby_centos6.sh
#!/bin/bash
# Vagrant CentOS6 boxes
# CentOS 6.4 x64 https://github.com/2creatives/vagrant-centos/releases/download/v6.4.2/centos64-x86_64-20140116.box
# CentOS 6.5 x64 https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box
# Update
sudo yum -y update
# Add Development tools
View RadarChart.js
//Practically all this code comes from https://github.com/alangrafu/radar-chart-d3
//I only made some additions and aesthetic adjustments to make the chart look better
//(of course, that is only my point of view)
//Such as a better placement of the titles at each line end,
//adding numbers that reflect what each circular level stands for
//Not placing the last level and slight differences in color
//
//For a bit of extra information check the blog about it:
//http://nbremer.blogspot.nl/2013/09/making-d3-radar-chart-look-bit-better.html
View Manager.php
<?php
namespace Acme\Validation\Capsule;
use Illuminate\Validation\Factory;
use Illuminate\Validation\DatabasePresenceVerifier;
use Illuminate\Container\Container;
use Illuminate\Filesystem\Filesystem;
use Symfony\Component\Translation\TranslatorInterface;
use Illuminate\Translation\Translator;
View ember-build.sh
ember build
cp dist/index.html app/views/app.php
cp -r dist/assets public/assets