Skip to content

Instantly share code, notes, and snippets.

@hollychen503
hollychen503 / API.md
Created July 4, 2018 07:41 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@hollychen503
hollychen503 / chrome_install_headless.sh
Created July 3, 2018 10:12 — forked from phith0n/chrome_install_headless.sh
Install Chrome headless on Ubuntu
export CHROME_BIN=/usr/bin/google-chrome
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
sudo apt-get update
sudo apt-get install -y libappindicator1 fonts-liberation libasound2 libgconf-2-4 libnspr4 libxss1 libnss3 xdg-utils
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
@hollychen503
hollychen503 / install-chrome-headless.sh
Created July 3, 2018 07:35 — forked from ipepe/install-chrome-headless.sh
Installing headless chrome on Ubuntu.
#!/bin/bash
# from https://chromium.woolyss.com/
# and https://gist.github.com/addyosmani/5336747
# and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:canonical-chromium-builds/stage
sudo apt-get update
sudo apt-get install chromium-browser
chromium-browser --headless --no-sandbox http://example.org/
@hollychen503
hollychen503 / delete-from-v2-docker-registry.md
Created June 9, 2018 08:17 — forked from jaytaylor/delete-from-v2-docker-registry.md
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@hollychen503
hollychen503 / acme-cert-dump-all.py
Created June 6, 2018 06:31 — forked from JayH5/acme-cert-dump-all.py
Dump all certificates from Traefik's acme.json to .pem files
#!/usr/bin/env python
import argparse
import base64
import json
import os
def main():
parser = argparse.ArgumentParser(
description="Dump all certificates out of Traefik's acme.json file")
@hollychen503
hollychen503 / .gitconfig
Created May 29, 2018 08:34 — forked from Kovrinic/.gitconfig
git global url insteadOf setup
# one or the other, NOT both
[url "https://github"]
insteadOf = git://github
# or
[url "git@github.com:"]
insteadOf = git://github
@hollychen503
hollychen503 / ubuntu_agnoster_install.md
Created May 8, 2018 02:42 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

// ==UserScript==
// @name Download YouTube Videos as MP4
// @description Adds a button that lets you download YouTube videos.
// @homepageURL https://github.com/gantt/downloadyoutube
// @author Gantt
// @version 1.8.10
// @date 2017-02-13
// @namespace http://googlesystem.blogspot.com
// @include http://www.youtube.com/*
// @include https://www.youtube.com/*
@hollychen503
hollychen503 / gist:74c001b15bf9cf8636bc9c2e7a0b883d
Created April 26, 2018 09:14 — forked from carlos8f/gist:3557993
how to raise file descriptor limits on mac os x
$ ulimit -n
2560
$ sudo su
$ echo "limit maxfiles 10000000 10000000" >> /etc/launchd.conf
(now restart mac os)
$ ulimit -n
10000000
apiVersion: v1
kind: ConfigMap
metadata:
name: traefik-conf-external
namespace: kube-system
data:
traefik.toml: |
defaultEntryPoints = ["http","https"]
debug = false
logLevel = "INFO"