Skip to content

Instantly share code, notes, and snippets.

View mrserverless's full-sized avatar
🌆
Building a Metaverse

Yun Zhi Lin mrserverless

🌆
Building a Metaverse
View GitHub Profile
@mrserverless
mrserverless / gist:51fe6cbb3438079350298a9930449f46
Created October 17, 2017 22:42 — forked from flaccid/gist:97473d0d85e2d6f4e292
Quick example of blue/green app ugprade on Rancher
$ export RANCHER_HOST=foo.bar.suf
$ export RANCHER_PORT=8080
$ export RANCHER_PROJECT_ID=1a8
$ export RANCHER_STACK_NAME=killerapp
$ ./cattle-deploy.py
output:
snapshot epoch is1437634695
created temp file /var/folders/sx/ht6gznq979v5r725sqt7_p617p38sz/T/tmpprzZsd
#!/bin/bash
set -e
GVERSION="1.9"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directories already exist $GOROOT"
@mrserverless
mrserverless / AwsV4SignatureCalculator.cs
Created January 29, 2017 12:10 — forked from yvanin/AwsV4SignatureCalculator.cs
This C# code calculates a request signature using Version 4 signing process. It was developed for and tested on Amazon SQS requests, so it does not cover every scenario for the other services, e.g. multipart uploads are not supported. Nevertheless, it's simple and independent single class that can be easily embedded into other projects. .NET Fra…
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
namespace AwsV4SignatureCalculator
@mrserverless
mrserverless / Unity3d.gitignore
Last active January 14, 2017 09:46
Unity3d gitignore
# Unity
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
# External Dependencies
/Assets/Plugins
@mrserverless
mrserverless / Unity3d .gitattributes
Last active May 7, 2018 11:31 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@mrserverless
mrserverless / alpine-harden.sh
Last active August 3, 2016 14:36 — forked from jumanjiman/harden.sh
hardening script for an alpine docker container
#!/bin/sh
set -x
set -e
#
# Docker build calls this script to harden the image during build.
#
# NOTE: To build on CircleCI, you must take care to keep the `find`
# command out of the /proc filesystem to avoid errors like:
#
# find: /proc/tty/driver: Permission denied
# BREW with xcode
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
sudo xcodebuild
brew update
brew install caskroom/cask/brew-cask
# BROWSERS
brew cask install firefox google-chrome
# JAVA
@mrserverless
mrserverless / docker-compose.yml
Last active February 17, 2017 09:45
Docker compose for Kong with Cassandra
cassandra:
ports:
- 9042:9042
image: cassandra:2.2
kong:
ports:
- 8000:8000/tcp
- 8443:8443/tcp
- 8001:8001/tcp
- 7946:7946/tcp
@mrserverless
mrserverless / owncloud-docker-compose.yml
Created April 15, 2016 14:10 — forked from MickaelBergem/ owncloud-docker-compose.yml
Docker Compose file for setting up an ownCloud server using a PostgreSQL database
# Composition of the containers
owncloud:
image: owncloud
ports:
- 80:80
volumes_from:
- owncloud-data
links:
- postgres:owncloud-db
@mrserverless
mrserverless / docker-compose.yaml
Last active February 17, 2017 09:45 — forked from usmanismail/docker-compose.yaml
Docker Cassandra Compose
CassandraSeed
environment:
RANCHER_ENABLE: 'true'
RANCHER_SEED_SERVICE: CassandraSeed
CASSANDRA_RACK: 'rack1'
CASSANDRA_DC: aws-us-east
CASSANDRA_ENDPOINT_SNITCH: GossipingPropertyFileSnitch
labels:
io.rancher.container.pull_image: always
tty: true