Skip to content

Instantly share code, notes, and snippets.

View airbr's full-sized avatar
🏠
Somewhat busy

Morgan Murrah airbr

🏠
Somewhat busy
View GitHub Profile
@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
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
///////////////////////////////////
// 5. More about Objects; Constructors and Prototypes
// Objects can contain functions.
var myObj = {
myFunc: function(){
return "Hello world!";
}
};
myObj.myFunc(); // = "Hello world!"
@airbr
airbr / history-bash.txt
Created November 7, 2020 04:58
just some bash history
518 mkdir git-fu
519 cd git-fu/
520 ll
521 clear
522 git init
523 ll
524 git tag genesis
525 ll
526 git log
527 git add
@airbr
airbr / pinboard-dark-mode.js
Created November 20, 2020 04:18
About as hacky and simple of a way to get Dark Mode on pinboard as you can get , using Tamper Monkey
// ==UserScript==
// @name pinboard-dark-mode
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include http://pinboard.in/*
// @include https://pinboard.in/*
// @include http://*.pinboard.in/*
// @include https://*.pinboard.in/*
@airbr
airbr / Craft-Lists-for-Sketch.md
Created March 11, 2021 10:59 — forked from demersdesigns/Craft-Lists-for-Sketch.md
A collection of text lists that can be imported into InVision's Craft plugin.
@airbr
airbr / most-starred-repo.rb
Created October 28, 2021 04:51
Most Starred Repo of User on Github in Ruby
# a function which finds the most starred repo of a user on GitHub
# Usage:
# most_starred_repo.rb <github_username>
# Example:
# most_starred_repo.rb airbr
require 'net/http'
require 'json'
@airbr
airbr / deep-comparison
Created November 14, 2021 06:09
JavaScript deep object comparison
function deepEqual(a, b) {
if (a === b) return true;
if (a == null || typeof a != "object" ||
b == null || typeof b != "object") return false;
let keysA = Object.keys(a), keysB = Object.keys(b);
if (keysA.length != keysB.length) return false;
@airbr
airbr / README-Template.md
Created December 3, 2021 02:49 — forked from DomPizzie/README-Template.md
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@airbr
airbr / sugh.sh
Created January 1, 2023 08:21 — forked from erdincay/sugh.sh
su GitHub (downloading all repositories from a given user)
#!/bin/bash
if [ -z "$1" ]; then
echo "waiting for the following arguments: username + max-page-number"
exit 1
else
name=$1
fi
if [ -z "$2" ]; then