Skip to content

Instantly share code, notes, and snippets.

View digitalnomad91's full-sized avatar
🌏
Hack the world

Andrew Corbin digitalnomad91

🌏
Hack the world
View GitHub Profile
@digitalnomad91
digitalnomad91 / server-setup.sh
Last active March 22, 2024 20:47
Debian Server Initialization Script
#!/usr/bin/env bash
#
# ./init_server.sh
#
### MAIN CONFIG VARS ####
ENVIRONMENT=dev
GITHUB_TOKEN=
@digitalnomad91
digitalnomad91 / magic-methods.js
Created June 27, 2023 20:17 — forked from loilo/magic-methods.js
PHP Magic Methods in JavaScript
function magicMethods (clazz) {
// A toggle switch for the __isset method
// Needed to control "prop in instance" inside of getters
let issetEnabled = true
const classHandler = Object.create(null)
// Trap for class instantiation
classHandler.construct = (target, args, receiver) => {
// Wrapped class instance
@digitalnomad91
digitalnomad91 / README.md
Created June 17, 2023 05:46 — forked from gregmark/README.md
Bash array usage cheatsheet.
@digitalnomad91
digitalnomad91 / README.md
Created June 7, 2023 01:06 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@digitalnomad91
digitalnomad91 / jq-cheetsheet.md
Created May 26, 2023 22:46 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

#!/usr/bin/env bash
{ # this ensures the entire script is downloaded #
nvm_has() {
type "$1" > /dev/null 2>&1
}
nvm_echo() {
command printf %s\\n "$*" 2>/dev/null
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
cat /etc/motd
neofetch
for f in /etc/update-motd.d/*; do
bash "$f"
done
#!/bin/bash
alias shopt='/usr/bin/shopt'
shopt -s expand_aliases
#zsh aliases
alias ohmyzsh="nano ~/.oh-my-zsh"
alias reload='source ~/.zshrc'
alias zshconfig='nano $HOME/.zshrc'
@digitalnomad91
digitalnomad91 / .zshrc
Last active May 16, 2023 21:26
zshhrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
### export NVM stuff
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
@digitalnomad91
digitalnomad91 / spf.py
Created October 1, 2022 03:49 — forked from LAKostis/spf.py
Check SPF records for expired Domains and DNS lookup depth
#!/usr/bin/env python3
# modified version of this snippet
# https://gist.github.com/TheRook/95f2b872bdc81bac2371
import dns.resolver
import dns.name
from urllib.parse import urlparse