# start container, attach stdin, use psuedo tty, use host network
docker run -it --network=host ubuntu:16.04
# Delete all containers
docker rm $(docker ps -aq)
# Delete all images
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
# 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 $@; |
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
{ | |
"$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": "conor.sheehan.dev@gmail.com", | |
"summary": "I'm a full stack web developer who can build apps from the ground up.", | |
"website": "https://conorsheehan1.github.io", | |
"location": { |
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
// 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"; |
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
# 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 | |
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
<!-- 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> |
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
# 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 |
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
// example: https://jsfiddle.net/conorsheehan1/vqdfsh31/ | |
// runnable in any browser console | |
// fail (coworker showed me this one) | |
(![] + [])[+[]] + (![] + [])[+!+[]] + ([![]] + [][[]])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]]; | |
// Naff | |
((![] + [][[]]) + [])[+[]] + ((![] + [][[]]) + [])[+!+[]] + (![] + [])[+[]] + (![] + [])[+[]]; | |
// Nooo |
-
{:x => y}
->{x: y}
Find Replace Comment :(\w+) =>
\1:
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
# 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" |
NewerOlder