Skip to content

Instantly share code, notes, and snippets.

View itsthatguy's full-sized avatar
✌️
Love.

Kevin Altman itsthatguy

✌️
Love.
View GitHub Profile
@itsthatguy
itsthatguy / 0_reuse_code.js
Created March 26, 2014 21:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/usr/bin/env bash
pattern=$1
PORTS=""
if [ -z "$pattern" ]; then
PORTS=$(lsof -iTCP -sTCP:LISTEN)
else
PORTS=$(lsof -iTCP -sTCP:LISTEN | grep -i "$pattern")
fi
@itsthatguy
itsthatguy / threeio.rb
Last active August 29, 2015 14:07 — forked from tlehman/threeio.rb
require 'net/http'
require 'colorize'
# find all available three-letter .io domains
alph = ('a'..'z')
# generate all three-character strings
threes = alph.map { |a| alph.map { |b| alph.map { |c| "#{a}#{b}#{c}" } } }.flatten
def io_available?(tld)
url = URI.parse("http://www.nic.io/cgi-bin/whois?query=#{tld}.io")
@itsthatguy
itsthatguy / dosh.sh
Last active August 29, 2015 14:22 — forked from bigtiger/dosh.sh
dosh() {
if [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "help" ]
then
read -r -d '' VAR << EOM
Usage: dosh [argument]
Arguments:
ls (default) lists running containers
[name|id] runs bash for specified container
help, -h, --help brings up this help
@itsthatguy
itsthatguy / ankama-launcher.nix
Created June 2, 2024 23:14 — forked from Zhaith-Izaliel/ankama-launcher.nix
NixOS ankama-launcher package
with import <nixpkgs>{};
let
name = "ankama-launcher";
src = fetchurl {
url = "https://download.ankama.com/launcher/full/linux/x64";
sha256 = ""; # Change for the sha256 you get after running nix-prefetch-url https://download.ankama.com/launcher/full/linux/x64
name = "ankama-launcher.AppImage";
};