Skip to content

Instantly share code, notes, and snippets.

View erichsu's full-sized avatar

eric.hsu erichsu

  • Ubiquiti, Inc
  • Taipei, TW
View GitHub Profile
@erichsu
erichsu / clean-docker.sh
Created July 7, 2018 08:27
Clean Docker volume
docker volume prune -f
docker system prune -a -f
// Helper function to create Policy
function buildWorkspacePolicy(options) {
options = options || {};
var resources = options.resources || [];
const workspaceSid = process.env.WORKSPACE_SID
const version = 'v1';
var urlComponents = [TASKROUTER_BASE_URL, version, 'Workspaces', workspaceSid]
return new Policy({
url: urlComponents.concat(resources).join('/'),
@erichsu
erichsu / clean-sim.sh
Created February 7, 2018 09:51
Clean iOS Simulator
xcrun simctl delete unavailable

Homebrew Permissions Denied Issues Solution

Installing and fixing node.JS


brew install node

@erichsu
erichsu / A.LICENSE.md
Created June 12, 2017 15:07 — forked from gonzalezreal/A.LICENSE.md
Using Realm with Value Types

Copyright 2017 Guillermo Gonzalez

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE U

@erichsu
erichsu / README
Created April 29, 2017 03:15
LightWonder
Hello World
@erichsu
erichsu / var_lib_rancher_cloud_config.yml
Created January 3, 2017 13:45
rancheros-change-sshd_config
write_files:
- path: /etc/ssh/sshd_config
permissions: "0600"
owner: root:root
content: |
Port 2222
@erichsu
erichsu / Install_tmux
Last active November 18, 2016 06:39 — forked from simme/Install_tmux
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@erichsu
erichsu / docker-monitor.sh
Created November 9, 2016 11:12
Docker General command suites
#!/bin/sh
docker stats $(docker ps --format={{.Names}})
@erichsu
erichsu / docker-compose.yml
Last active December 20, 2016 23:49
docker-confluence
version: '2'
services:
confluence:
image: "cptactionhank/atlassian-confluence"
environment:
- "CATALINA_OPTS= -Xms256m -Xmx384m"
ports:
- "80:8090"
- "8091:8091"
volumes: