Skip to content

Instantly share code, notes, and snippets.

View airbr's full-sized avatar
🏠
Working from home

Morgan Murrah airbr

🏠
Working from home
View GitHub Profile
99.downto(1) do |bottles|
puts "#{bottles} bottle#{"s" if bottles != 1} of beer on the wall.",
"#{bottles} bottle#{"s" if bottles != 1} of beer.",
"Take one down, pass it around.",
"#{bottles - 1} bottle#{"s" if bottles - 1 != 1} of beer on the wall.\n\n"
end
@airbr
airbr / status_log.sh
Created January 18, 2020 22:33
Basic Logging
#!/bin/sh
echo "Status Script Running";
DATE=$(date);
WHO=$(who);
UPTIME=$(uptime);
#PSTREE=$(pstree)
RESULT=$DATE"\n"$WHO"\n"$UPTIME
@airbr
airbr / svndiffmodified.txt
Created May 8, 2018 17:23
Svn Diff All Modified files
svn st | awk '$1 == "M"{print $2;}'| xargs svn diff
@airbr
airbr / remove_spaces_unix
Created March 12, 2018 18:20
Remove spaces from files in a given directory
for f in *; do mv "$f" `echo $f | tr ' ' '_'`; done
@airbr
airbr / bling.js
Created March 4, 2018 20:54 — forked from paulirish/bling.js
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@airbr
airbr / change-favicon.js
Created November 16, 2017 16:04 — forked from mathiasbynens/change-favicon.js
Dynamically changing favicons with JavaScript
/*!
* Dynamically changing favicons with JavaScript
* Works in all A-grade browsers except Safari and Internet Explorer
* Demo: http://mathiasbynens.be/demo/dynamic-favicons
*/
// HTML5™, baby! http://mathiasbynens.be/notes/document-head
document.head || (document.head = document.getElementsByTagName('head')[0]);
function changeFavicon(src) {
@airbr
airbr / gist:cd7344da8df3d7a7eed697ac6faee3bb
Created June 24, 2017 16:21
Find all file types/sort
find ~/<directory> -exec file -b --mime-type {} + | sort | uniq -c | sort -nr
@airbr
airbr / gist:5544e4da6d89aeb81cfffd6c783312bf
Created May 23, 2017 02:46
Handy IP/ Address print to console
ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'
@airbr
airbr / morgangrep.txt
Created May 11, 2017 21:54
Personal Grep Cheatsheet
// Searches current directory recursively using extended regular expressions for Hex Codes i.e. :
// Single or double quote group+maybe a # sign+xdigits with a range of 6+ single or double quote group
grep -rE --color "(\'|\")#?[[:xdigit:]]{6,6}(\'|\")" .
@airbr
airbr / README-Template.md
Created March 29, 2017 01:27 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites