Skip to content

Instantly share code, notes, and snippets.

View macintacos's full-sized avatar

Julian Torres macintacos

View GitHub Profile
@macintacos
macintacos / .bash_profile
Last active November 13, 2016 16:37
My current Terminal '.bash_profile', using the one found here as a base: https://natelandau.com/my-mac-osx-bash_profile/
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
$snapins = Get-PSSnapin -Registered
$snapins | Add-PSSnapin
Get-PSSnapin | Format-Table -autosize PSVersion, Name
function ff ([string] $glob) { get-childitem -recurse -include $glob }
function osr { shutdown -r -t 5 }
function osh { shutdown -h -t 5 }
@macintacos
macintacos / rename-8601.sh
Created March 7, 2017 17:27
Crazy dirty script to prepend all filenames in a directory with ISO8601-formatted dates
for f in *;
do
filename=$(basename "$f")
filenamespacereplace=${filename// /-}
filecreationdate=$(GetFileInfo -d "$f")
truncateddate=${filecreationdate::10}
dateslashreplace=${truncateddate////-}
truncatedyear=${dateslashreplace:6:9}
truncatedday=${dateslashreplace:3:2}
@macintacos
macintacos / .zshrc
Created June 29, 2018 14:55
My Dumb GZSH Profile
## PROFILING INFORMATION.
## Uncomment the following line (and last line) to get loading times for zshell
# zmodload zsh/zprof
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
PATH=~/perl5/perlbrew/bin:$PATH
PATH=/usr/local/lib/node_modules:$PATH
export TERM="xterm-256color"
@macintacos
macintacos / cloudSettings
Last active September 29, 2020 04:43
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-09-29T04:43:05.682Z","extensionVersion":"v3.4.3"}
@macintacos
macintacos / mongod-post44.json
Last active February 14, 2024 17:47
JSON file for formatting `lnav` MongoDB logs, both "pre" 4.4 and "post" 4.4 (i.e. when structured logging was introduced). Place these files in `$HOME/.lnav/formats/installed`
{
"mongod_post44": {
"title": "MongoDB 4.4 Log format",
"description": "New log format beginning with MongoDB 4.4",
"url": "https://docs.mongodb.com/manual/reference/log-messages/index.html#structured-logging",
"json": true,
"file-pattern": ".*mongodb.log",
"line-format": [
{ "field": "__timestamp__" },
" ",
* {
filter: invert(100%);
}
@macintacos
macintacos / gimme-my-icons-plz.js
Last active May 2, 2020 17:00
Bringing icons (in an emoji form) back to the MongoDB Atlas UI. Add this as your own UserScript in something like Tampermonkey and it'll give you emojis for the icons in the left-hand bar.
// ==UserScript==
// @name Gimme My Icons Plz
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Adding emojis in place of icons for the Atlas Project UI. This now handles the new redesign properly.
// @author macintacos
// @match https://cloud.mongodb.com/v2/*
// @exclude https://cloud.mongodb.com/v2/admin*
// @require http://code.jquery.com/jquery-3.4.1.min.js
// @grant none
@macintacos
macintacos / normal-layer.md
Last active January 5, 2020 00:23
NORMAL Layer as of January 4, 2020
Physical Key Mapping Action Performed Color
Tab tab Tab #00a3e9 (Desert Sun Blue)
W alt+right Move right 1 word #00a3e9 (Desert Sun Blue)
E alt+right Move right 1 word #00a3e9 (Desert Sun Blue)
R cmd+shift+z Redo #00a3e9 (Desert Sun Blue)
Y cmd+c Copy #00a3e9 (Desert Sun Blue)
U cmd+z Undo #00a3e9 (Desert Sun Blue)
I TO(1) Go to Base #f2671f (Sunset Orange)
P cmd+v Paste #00a3e9 (Desert Sun Blue)
@macintacos
macintacos / visual-layer.md
Created January 5, 2020 00:31
VISUAL Layer as of January 4, 2020
Physical Key Mapping Action Performed Color
W alt+shift+right Select right 1 word #878eff (Solarized Purple)
E alt+shift+right Select right 1 word #878eff (Solarized Purple)
Y cmd+c Copy #878eff (Solarized Purple)
I TO(1) Go to Base #878eff (Solarized Purple)
P cmd+v Paste #878eff (Solarized Purple)
Backspace shift+left Select left 1 character #878eff (Solarized Purple)
ESC TO(1) Go to Base #878eff (Solarized Purple)
A TO(1) Go to Base #878eff (Solarized Purple)