Skip to content

Instantly share code, notes, and snippets.

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@russel-yang
russel-yang / sh
Last active September 6, 2020 17:54
curl command
curl -v -H "store-application-id:PRIVATE_DIVISION_STORE" -H "cf-ipcountry:CA" "http://service-t2gp-contentful-service.service-withtype/en/api/getproductpage?id=buy-outer-worlds"
@russel-yang
russel-yang / terraform-kubernetes-docker-macos.md
Created September 1, 2020 03:25 — forked from ivaravko/terraform-kubernetes-docker-macos.md
The simple Terraform and Kubernetes with Docker on macOS

If you'd like to experiment with Terraform and Kubernetes on macOS locally, a great provider for doing so is the Kubernetes provider. You can get set up in a few simple steps, like so:

1. Install Docker

Install Docker for Mac if you have not already.

jest.mock('node-fetch', () => ({
__esModule: true,
default: () => ({
json: () => ({
token: 'my-token',
}),
}),
}));
@russel-yang
russel-yang / kill-process-use-a-port.sh
Created June 30, 2020 15:15
Kill the process listening on a port
lsof -i :3000 | tail -n 1 | awk '{split($0,a," "); print a[2];}' | xargs kill -9
@russel-yang
russel-yang / Readme.md
Created March 4, 2020 05:34 — forked from HoverBaum/Readme.md
Filter empty assets from Contentful export.

Using the Contentful Export tool I noticed that you can currently run into a situation where you export assets that have no files linked which will through an error when you try to pass the exported json into the Contentful Import tool as discussed in issue 95.

As a temporary solution I wrote myselve this script that you can pipe data through to filter out these malformed assets.

cat export.json | node filter-empty-assets.js > filtered-export.json

Now you can use the filteres-export.json for your import and it should work.

@russel-yang
russel-yang / my.sh
Created March 4, 2020 02:22
install python venv-awscli
python3 -m venv ~/pyenv
source ~/pyenv/bin/activate
pip install awscli
aws help