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 / README.md
Created December 30, 2021 12:54 — forked from zhiguangwang/README.md
Building Unreal Engine Game Client and Dedicated Server on Linux.

Building Unreal Engine Game Client and Dedicated Server on Linux

Because the build tools of UE4 works across platforms (Windows, Mac OS, Linux), steps in this article can be applied to Mac OS and Windows as well.

On Windows, You need to replace RunUAT.sh with RunUAT.bat though.

Prerequisites

First, get Unreal Engine 4 sourcecode and export the following environment variables:

@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 .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
@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
@mrserverless
mrserverless / RXGlue.groovy
Created December 10, 2015 01:59 — forked from pintowar/RXGlue.groovy
Creating a SSE streaming with Apache Camel and Ratpack, using Rx Groovy as a glue
@Grab('com.netflix.rxjava:rxjava-groovy:0.20.7')
@Grab('io.reactivex:rxjava-reactive-streams:0.3.0')
@Grab('org.apache.camel:camel-rx:2.14.1')
@Grab('io.ratpack:ratpack-groovy:0.9.11')
@Grab('org.slf4j:slf4j-simple:1.6.6')
import org.apache.camel.impl.*
import org.apache.camel.rx.*
import static rx.RxReactiveStreams.toPublisher
import static ratpack.groovy.Groovy.ratpack
import static ratpack.sse.ServerSentEvents.serverSentEvents;
@mrserverless
mrserverless / JdbiIntegrationTest.java
Last active August 29, 2015 14:08 — forked from thody/JdbiIntegrationTest.java
Dropwizard JDBI Integration Test slightly more simplified and upgraded to Dropwizard version 0.7.1
public abstract class JdbiIntegrationTest {
protected DBI dbi;
private Handle handle;
private Liquibase liquibase;
protected abstract DataSourceFactory getDataSourceFactory();