This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Keep mac awake until app is idle | |
caffeinate -i open -W -a iMovie.app | |
// Show hidden files (FALSE to hide) | |
defaults write com.apple.finder AppleShowAllFiles TRUE | |
// Create textfile of directory and all sub-directories (use .csv to maked a CSV) | |
ls -R /DIRECTORY > file-name.txt | |
// Find the PID running on port 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ask for the administrator password upfront | |
sudo -v | |
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
############################################################################### | |
# General UI/UX # | |
############################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in 1...501 | |
puts "example#{i}@example.com" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# script to pull 50 passwords into a CSV | |
# Requires 'curb' Ruby Gem ($ gem install curb) | |
# Pipe into CSV file for easy copy and paste! | |
# To run: | |
# cd to directory where file is stored | |
# $ Ruby dinopass.rb > passwords.csv | |
require 'curb' | |
for i in 0...50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
buffer = '' | |
while True: | |
line = input() | |
if not line: break | |
buffer += '"' + line + '",' | |
cmd = 'echo '+buffer[:-1].strip()+'|clip' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# usage: ./split.sh <FILE> <LINES> | |
FILE_PATH="$1" | |
FILE_BASENAME="${FILE_PATH##*/}" | |
FILE_NAME="${FILE_BASENAME%%.*}" | |
FILE_EXTENSION="${FILE_BASENAME#*.}" | |
SPLIT_LINES=${$2:-500000} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SO] Updating a progress bar UI for long running process | |
https://stackoverflow.com/questions/24251898/flask-app-update-progress-bar-while-function-runs | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- See connections with status | |
select | |
c.session_id, | |
c.net_transport, | |
c.encrypt_option, | |
s.status, | |
c.auth_scheme, | |
s.host_name, | |
s.program_name, | |
s.client_interface_name, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Keychron Q3", | |
"vendorProductId": 875823393, | |
"macros": [ | |
"{KC_LGUI,KC_LSFT,KC_A}", | |
"{KC_LGUI,KC_LSFT,KC_LALT,KC_LCTL,KC_PGUP}", | |
"{KC_LGUI,KC_LSFT,KC_LALT,KC_LCTL,KC_PGDN}", | |
"", | |
"", | |
"", |