Skip to content

Instantly share code, notes, and snippets.

@mashenjun
mashenjun / from.yaml
Last active April 25, 2022 01:42 — forked from Daniel-ltw/from.yaml
Github Actions repository_dispatch example
name: Build Artifacts
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
@mashenjun
mashenjun / git_cheat-sheet.md
Created May 16, 2018 05:53 — forked from davfre/git_cheat-sheet.md
git commandline cheat-sheet
@mashenjun
mashenjun / docker-cleanup-resources.md
Created March 6, 2018 06:10 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@mashenjun
mashenjun / API.md
Created November 29, 2017 10:50 — 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:

@mashenjun
mashenjun / .travis.yml
Created November 20, 2017 23:37 — forked from douglasduteil/.travis.yml
Here is how I allow Git SSH authentication in Travis CI. I'm using it to connect Travis to my repo organization AngularUI. This trick is a fork. The goal is to encode the RSA private deploy key in the .travis.yml as "-secure: xxxxx.....".
---
language: node_js
node_js:
- '0.10'
branches:
only:
- master
before_script: .travis/before_script.sh
script: echo -e " >>> Do something... \"grunt\" for example\n"
after_success: .travis/after_success.sh
@mashenjun
mashenjun / benchmark-ec2-boottime.sh
Created December 13, 2015 16:29 — forked from andsens/benchmark-ec2-boottime.sh
Starts a single instance and measures the time until SSH connectivity
#!/bin/bash -e
# These need to be set.
#export EC2_HOME="/path/to/ec2-api-tools"
#export AWS_ACCESS_KEY='XXXXXXXXXXXXXXXXXXXX'
#export AWS_SECRET_KEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
#export PATH="$PATH:${EC2_HOME}/bin"
ami_id='ami-123abc12'
availability_zone='eu-west-1a'
keypair="johndoe@example.com"