Skip to content

Instantly share code, notes, and snippets.

View rpowis's full-sized avatar
🤖
beep boop

Rory Powis rpowis

🤖
beep boop
View GitHub Profile
@rpowis
rpowis / extensions.sh
Created March 20, 2023 12:56
VSCode config
# code --list-extensions
adpyke.codesnap
amazonwebservices.aws-toolkit-vscode
apollographql.vscode-apollo
axetroy.vscode-npm-import-package-version
bierner.github-markdown-preview
bierner.markdown-checkbox
bierner.markdown-emoji
bierner.markdown-footnotes
bierner.markdown-mermaid

Keybase proof

I hereby claim:

  • I am rpowis on github.
  • I am rpowis (https://keybase.io/rpowis) on keybase.
  • I have a public key ASCRvE50YDFEXb9GNGuYpVNpOuobr2ch3OmGl7upwxpkcAo

To claim this, I am signing this object:

cowsay HAPPY BIRTHDAY ELLEN!!! 🥳 🎂🍸
@rpowis
rpowis / release.sh
Last active February 8, 2019 12:32
releasing hmrc-frontend/package-latest
#!/usr/bin/env bash
# Set up `package-latest` branch in the `package` directory
rm -rf package
git fetch origin
git checkout package-latest && git checkout master
git worktree add package package-latest
# Build
npm run build:package &&\
@rpowis
rpowis / namespacing-conflicting-macros.md
Last active January 7, 2019 15:05
Namespacing conflicting macros

Goals

  1. Nothing higher than the package root should be exposed to views

Stretch goals

  1. Changes to the package structure shouldn't require updates to config
  2. Import paths should map to source paths

1. Prefixed component names

# For more information about the properties used in
# this file, please see the EditorConfig documentation:
# http://editorconfig.org/
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
@rpowis
rpowis / convert-views.sh
Created August 19, 2016 15:16
Convert mustache/hogan templates to nunjucks.
#### REPLACE LAYOUTS
{{<layouts(.*)}}((.|\n)*){{\/(.*)}}
replace with
{% extends "$1.html" %} $2
#### REPLACE BLOCK TITLES
add_action('init', 'myStartSession', 1);
add_action('wp_logout', 'myEndSession');
add_action('wp_login', 'myEndSession');
function myStartSession() {
if(!session_id()) {
session_start();
}
}
@rpowis
rpowis / git-tricks
Created October 8, 2013 12:55
Git tricks
# Apply a patch from another (unrelated) local repository
$ git --git-dir=../some_other_repo/.git format-patch -k -1 --stdout <commit SHA> | git am -3 -k
# Checout an empty branch to do something radically different (i.e. gh-pages)
$ git checkout --orphan <new_empty_branch>
# Find the root of the project
$ git rev-parse --show-toplevel
# Change to the root of the project
@rpowis
rpowis / cli-tricks.sh
Created September 12, 2013 09:14
Command line tricks and one-liners
#
# This is a list of useful commands and one-liners to make
# life on the command line easier
#
# Create complex directory structures
$ mkdir -p project/{lib/ext,bin,src,doc/{html,info,pdf},demo/stat/a}
# Option -C to unpack a .tar archive file to a location
$ tar xvf -C tmp/a/b/c newarc.tar.gz