Skip to content

Instantly share code, notes, and snippets.

Devin Breen ometa

Block or report user

Report or block ometa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ometa /
Created May 31, 2017
Add the GPLv3 header to the top of each source code file
for i in $(git ls | grep "\.rb$"); do
year=$(git log --follow --diff-filter=A $i | grep Date | tail -1 | awk '{ print $6 }')
echo "Adding GPL3 header w/ year $year to $i"
cat ~/lic.txt |sed "s|THEDATE|$year|" | cat - $i > /tmp/temp && mv /tmp/temp $i
ometa / jenkins-api-examples
Created Feb 17, 2017 — forked from marshyski/jenkins-api-examples
Jenkins trigger, create and remove jobs and folders
View jenkins-api-examples
# check if job exists
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user
# with folder plugin
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user
# without folder plugin
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user
# create folder
ometa / plex.nginx.conf
Last active Dec 8, 2018
NGINX reverse proxy in front of Plex media server v1.3.3.3148
View plex.nginx.conf
# This example assumes the NGINX proxy is on the same host as the Plex Media Server.
# To configure Plex Media Server to serve requests without requiring authentication,
# ensure that your LAN subnet is correctly added to the advanced server setting called
# "List of IP addresses and networks that are allowed without auth". Example:
upstream plex-upstream {
ometa / bundle exec derailed bundle:mem.txt
Created Dec 19, 2016
derailed_benchmarks for dogtag
View bundle exec derailed bundle:mem.txt
$ bundle exec derailed bundle:mem
TOP: 39.8594 MiB
rails/all: 13.5508 MiB
active_record/railtie: 6.5781 MiB
active_record: 4.8164 MiB (Also required by: authlogic)
active_record/connection_adapters/abstract_adapter: 2.1992 MiB
active_record/connection_adapters/abstract/schema_statements: 0.7383 MiB
active_record/migration/join_table: 0.3555 MiB
active_record/migration: 0.3398 MiB
active_record/type: 0.4648 MiB
ometa /
Created Sep 14, 2016 — forked from epicserve/
A simple script to print the size of all your Redis keys.
#!/usr/bin/env bash
# This script prints out all of your Redis keys and their size in a human readable format
# Copyright 2013 Brent O'Connor
# License:
human_size() {
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } '
ometa /
Last active Sep 2, 2016 — forked from antonbabenko/
Curl list of urls and save http response code & times (useful for cache warmup)
[ ! $1 ] && echo "you must include a file containing urls, one per line" && exit 1
while read LINE; do
curl -o /dev/null --silent --progress-bar --head --write-out '%{http_code} %{time_starttransfer} %{url_effective}\n' "$LINE"
done < $1
You can’t perform that action at this time.