Skip to content

Instantly share code, notes, and snippets.

git config --global alias.ll "log --oneline --decorate --graph --all"
@wes-goulet
wes-goulet / convertMovToGif.sh
Last active September 6, 2018 15:44
converts an mov to gif using ffmpeg on macos
# use gifify to output at 400px width (maintain aspect ratio)
brew install gifify
gifify -p 400:-1 esc-key.mov
### OLD - looks pixelated
# from https://superuser.com/a/436109 - see that link for optimized version as well
ffmpeg -i yesbuddy.mov -pix_fmt rgb24 output.gif
@wes-goulet
wes-goulet / common-git-commands.sh
Created February 20, 2018 18:59
Some commonly used git commands
######################################## Remove all traces of a submodule
# from https://stackoverflow.com/a/36593218
# Remove the submodule entry from .git/config
git submodule deinit -f path/to/submodule
# Remove the submodule directory from the superproject's .git/modules directory
rm -rf .git/modules/path/to/submodule
# Remove the entry in .gitmodules and remove the submodule directory located at path/to/submodule
# manually install xcode from app store, launch it so EULA is accepted, install additional tools/CLI tools if asked
# install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install rectangle (window manager)
brew cask install rectangle
@wes-goulet
wes-goulet / css-grid-example.css
Created July 26, 2018 17:07
CSS Grid Example
.container {
height: 100%;
display: grid;
grid-gap: 3px;
grid-template-columns: repeat(12, 1fr);
grid-template-rows: 40px auto 40px;
grid-template-areas:
"h h h h h h h h h h h h"
"m c c c c c c c c c c c"
"f f f f f f f f f f f f";
@wes-goulet
wes-goulet / gpg-git-setup.sh
Last active September 26, 2022 23:32
Commands to import and setup your gpg key for git commit signing
# install gpg
brew install gnupg
# copy my-gpg-key.asc from other workstation or lastpass or somewhere
# and then import it
gpg --import ~/Downloads/my-gpg-key.asc
# make sure it's there and get the key id (the part that comes after "rsa4096/")
gpg --list-secret-keys --keyid-format LONG
### create linode - https://www.linode.com/docs/getting-started/#create-a-linode
# use random password and save in lastpass
# update packages
yum update
# set hostname
hostnamectl set-hostname example_hostname
# set timezone
npx gzip-size-cli dist/esm/wc-menu-button.min.js
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug index.ts",
@wes-goulet
wes-goulet / css-tips.md
Last active December 28, 2022 07:42
bullet list of css tips

Margin

  • default margin on the top and bottom of text elements (headings, paragraphs, lists), is equal to the font-size.
    • (for h1 it's actually a little bit smaller, but it's close enough)
  • Whenever two margins touch each other, they will collapse into one single margin instead of two of them which push against one another
  • To center something horizontally on the screen use auto margin, like section { margin: 0 auto; }

Selectors

  • Select multiple elements with comma
    • h1, h3, p { margin-top: 0; }
  • Last selector wins, so p font-size would be 20px in this example: