Skip to content

Instantly share code, notes, and snippets.

@geoffyuen
geoffyuen / firestick4k.md
Last active November 7, 2023 15:59
Amazon Fire Stick 4k Tips and Tricks
@geoffyuen
geoffyuen / wp-cli.md
Last active February 16, 2023 06:07
WP CLI Cheatsheet

WP CLI cheatsheet

You may need to be at the root of your WP install. In Local by Flywheel this will be the app directory.

Backup database

wp db export your/path/here/my_wordpress_db.sql

Import database

@geoffyuen
geoffyuen / readme.md
Created November 22, 2018 15:56
Import CSV into ACF Repeater (Wordpress)
@geoffyuen
geoffyuen / font-monserrat.scss
Created December 14, 2016 15:06
CSS for Montserrat in 9 weights from Font Squirrel
@font-face {
font-family: 'Montserrat';
src: url('fonts/montserrat-thin-webfont.woff2') format('woff2'),
url('fonts/montserrat-thin-webfont.woff') format('woff');
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: 'Montserrat';
@geoffyuen
geoffyuen / mames.sh
Created April 1, 2021 17:30
dumb ia-rcade menu for bash
mames(){
ls -l ~/mame/roms
local IFS=$'\n'
echo "Search for: "
read inp
echo .
local PS3="Type a number: "
select file in $(mame -listfull|grep -i "$inp")
do
# get first word from selected string/line using awk
@geoffyuen
geoffyuen / impose_pdf.md
Last active March 28, 2021 17:35
Impose a pdf for free

Debian:

sudo apt install texlive-latex-base
sudo apt install texlive-extra-utils

MacOS Homebrew (untested):

@geoffyuen
geoffyuen / timber.md
Last active February 23, 2021 04:32
Timber Cheatsheet

Timber Cheatsheet

Srcset images

<img src="{{ fn('wp_get_attachment_image_url', post.thumbnail.id, 'medium') }}" 
  srcset="{{ fn('wp_get_attachment_image_srcset', post.thumbnail.id, 'medium' ) }}"
  sizes="(max-width: 1024px) 100vw, 1024px" 
  alt="Post thumbnail">
@geoffyuen
geoffyuen / git.md
Last active February 19, 2021 21:32
Git Cheatsheet

Git Cheatsheet

Just get the latest version

Good for skeleton themes, frameworks, etc

git clone --depth=1 <remote_repo_url>
@geoffyuen
geoffyuen / input.scss
Created January 28, 2021 04:48
Generated by SassMeister.com.
@function cfg($key, $map: $cfg) {
@return map-get($map, $key);
}
$tach:(
values: (
0: 0,
1: 1px,
2: 2px,
),
rules: (
@geoffyuen
geoffyuen / input.scss
Last active January 25, 2021 04:39
Tailwind/Tachyons genrerator in pure Sass.
@function cfg($key, $map: $cfg) {
@return map-get($map, $key);
}
$cfg: (
whitespace: (
values: (
0: 0,
1: 1px,