set -x
shows all commands in bash as they are run.
to stop showing commands, reload the shell e.g. exec $SHELL
set -x && echo "hi"
exec $SHELL
# # output (stdout)
# + echo hi
# hi
{ | |
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
"basics": { | |
"name": "Conor Sheehan", | |
"label": "Software Engineer", | |
"image": "https://s.gravatar.com/avatar/e5177f7635c1a7c51a50de6dc80052fe?s=300&r=g", | |
"email": "[email protected]", | |
"summary": "I'm a full stack web developer who can build apps from the ground up.", | |
"website": "https://conorsheehan1.github.io", | |
"location": { |
// https://codepen.io/hmaw/pen/qBEMLxV | |
// sass fixes https://sass-lang.com/documentation/breaking-changes/color-units | |
// https://sass-lang.com/documentation/breaking-changes/slash-div | |
// // to use, add html like this: | |
// <div class="fireworks"> | |
// <div class="beforeFireworks" v-if="showGameWonModal" /> | |
// <div class="afterFireworks" v-if="showGameWonModal" /> | |
@use "sass:math"; |
<!-- paste the following into the address bar --> | |
data:text/html,<body style="margin:0;font-family: monospace;font-size: large"><div style="margin:0;padding: 1em; height: 100vh" contenteditable>EDIT ME</div></body> |
// example: https://jsfiddle.net/conorsheehan1/vqdfsh31/ | |
// runnable in any browser console | |
// fail (coworker showed me this one) | |
(![] + [])[+[]] + (![] + [])[+!+[]] + ([![]] + [][[]])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]]; | |
// Naff | |
((![] + [][[]]) + [])[+[]] + ((![] + [][[]]) + [])[+!+[]] + (![] + [])[+[]] + (![] + [])[+[]]; | |
// Nooo |
# print the path to the latest screenshot | |
latest_screenshot() { | |
# get screenshot dir, replace ~ with $HOME (required for ls to work) | |
screenshot_dir=$(defaults read com.apple.screencapture location | sed "s;~;$HOME;") | |
# use ls -t to order by time, use head -n 1 to get only latest | |
file_name=$(/bin/ls -t $screenshot_dir | head -n 1) | |
# if REL is passed, show relative path (filename), otherwise show absolute path | |
if [[ -z "$REL" ]]; then | |
printf "%q\n" "$screenshot_dir/$file_name" | |
else |
# bash, find import in every .py file recursively under the current dir | |
grep -rin --include="*.py" import | |
# find files bye name and follow symlinks | |
find -L ./ -name "*.sublime-snippet" |
# show commits from all branches for current git user. | |
function my-commits-since() { | |
git log --all --author=$(git config user.email) --since=$@ | |
} | |
# show commits from yesterday. | |
# if none were found, assume it's Monday and show commits from Friday. | |
function standup() { | |
if [ -z "$(my-commits-since yesterday)" ]; then | |
my-commits-since last.friday.midnight $@; |
set -x
shows all commands in bash as they are run.
to stop showing commands, reload the shell e.g. exec $SHELL
set -x && echo "hi"
exec $SHELL
# # output (stdout)
# + echo hi
# hi
# add indent after access modifier e.g. private | |
Layout/IndentationConsistency: | |
EnforcedStyle: indented_internal_methods # previously rails style | |
# Use double quotes by default, common in large projects including rails | |
# https://anti-pattern.com/always-use-double-quoted-strings-in-ruby | |
Style/StringLiterals: | |
Enabled: true | |
EnforcedStyle: double_quotes | |