Skip to content

Instantly share code, notes, and snippets.

sudo softwareupdate --fetch-full-installer
/Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall \
--eraseinstall --agreetolicense --nointeraction
@chris-zen
chris-zen / install-docker.sh
Created July 20, 2018 22:19 — forked from brianz/install-docker.sh
Install docker on Amazon Linux
#!/bin/bash
#
# steps taken verbatim from:
# http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html#install_docker
#
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# log out and log in to pickup the added group
@chris-zen
chris-zen / Sphere.cpp
Created September 4, 2016 19:59 — forked from zwzmzd/Sphere.cpp
[OpenGL] An example to draw a sphere with vao and vbo
#include "sphere.h"
#include <vector>
#include <iostream>
#include <glm/gtc/matrix_inverse.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/string_cast.hpp>
Sphere::Sphere()
{
apply plugin: 'java'
apply plugin: 'scala'
// For those using Eclipse or IntelliJ IDEA
apply plugin: 'eclipse'
apply plugin: 'idea'
def findPlay20(){
def pathEnvName = ['PATH', 'Path'].find{ System.getenv()[it] != null }
for(path in System.getenv()[pathEnvName].split(File.pathSeparator)){
for(playExec in ['play.bat', 'play.sh', 'play']){
#!/usr/bin/env bash
# Licensed under the Apache License, Version 2.0
# Adapted from https://github.com/paulp/psp-std/blob/master/bin/test
runTests () {
sbt test || exit 1
echo "[info] $(date) - finished sbt test"
}
stripTerminalEscapeCodes () {
class ROType(type):
def __new__(mcl, classname, bases, classdict):
class UniqueROType (mcl):
pass
def getAttrFromMetaclass(attr):
return lambda cls: getattr(cls.__metaclass__, attr, None)
for attr, value in classdict.items():
if not hasattr(value, '__call__') and attr.startswith('_') and not attr.startswith('__'):
from pulsar import arbiter, command
names = ['john', 'luca', 'carl', 'jo', 'alex']
@command()
def greetme(request, message):
echo = 'Hello {}!'.format(message['name'])
request.actor.logger.info(echo)
return echo
import mesosphere.mesos.util.FrameworkInfo
import org.apache.mesos.MesosSchedulerDriver
/**
* @author Tobi Knaup
*/
object Main extends App {
upstream backend {
server 127.0.0.1:5000;
}
server {
listen 80;
server_name my_site.localhost.com;
set $static /home/taar/git/MySite/my_site/admin/static;
root $static;
keepalive_timeout 60;