$ docker pull registry
$ sudo yum install python-pip
#!/bin/sh | |
set -e | |
export PATH=/usr/local/bin:/usr/bin:/bin | |
read name address role tags | |
file=/etc/hosts | |
tmp_file=/tmp/hosts.tmp |
class Model < ActiveRecord::Base | |
scope :retrieve_all, ->(*tables) { | |
select_stmt = [%{`#{self.table_name}`.*}] | |
select_stmt << tables.map {|t| | |
ar = ActiveRecord::Base.const_get(t.to_s.classify.singularize) | |
table_name = ar.table_name | |
table_name_single = table_name.singularize | |
ar.attribute_names.map {|col| |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Email::Sender::Simple qw/sendmail/; | |
use Email::MIME; | |
use Encode; | |
my $email = Email::MIME->create( |
#!/bin/sh | |
## e.g.) sudo ./swap_stats.sh | column -t | sort -nrk3 | head -n25" | |
if [ $UID -ne 0 ] ; then | |
echo "You must be root to run this script." 1>&2 | |
exit 1 | |
fi | |
TOTAL_SWAP=0 |
# # # # # # # ##### ###### # # #### # # | |
# # ## # # # # # # # ## # # # # # | |
# # # # # # ## ##### ##### # # # # ###### | |
# # # # # # ## # # # # # # # # # | |
# # # ## # # # # # # # ## # # # # | |
#### # # # # # ##### ###### # # #### # # | |
Version 5.1.3 Based on the Byte Magazine Unix Benchmark | |
Multi-CPU version Version 5 revisions by Ian Smith, |
#!/usr/bin/env perl | |
use sane; | |
use Redis::Fast; | |
use Time::Piece; | |
use DDP; | |
my $user_id = 100; | |
my $u = UserLastAccess->new(user_id => $id); |
#!/bin/bash | |
set -e | |
export PATH=/sbin:/bin:/usr/sbin:/usr/bin | |
export LANG=C | |
if [ $UID -ne 0 ] ; then | |
echo "You must be root to run this script." | |
exit 1 |
#!/bin/bash | |
PATH=/usr/bin:/bin:/usr/sbin:/sbin | |
export PATH | |
function pushover() { | |
curl -s -X POST \ | |
--form-string "token=$PUSHOVER_TOKEN" \ | |
--form-string "user=$PUSHOVER_USER" \ | |
--form-string "title=RabbitMQ Restart Attempted" \ |
rabbitmqctl eval '[garbage_collect(P) || P <- processes()].' |