version: '3.3'
services:
db:
image: mysql:5.7
ports:
- "3306:3306"
restart: always
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# A value between 0-1.0 | |
strength=0.6 | |
white="#e8a2c9" | |
black="#813722" | |
# https://unix.stackexchange.com/questions/40786/how-to-do-integer-float-calculations-in-bash-or-other-languages-frameworks/40897#40897 | |
calc() { awk "BEGIN{print $*}"; } | |
strength_inv=$(calc 1-$strength) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
heroku_app=my-app | |
client_id=XXXX | |
client_secret=XXXX | |
redirect_uri=https://example.com/ | |
generateAccessToken() { | |
http https://graph.facebook.com/v6.0/oauth/access_token \ | |
client_id=="${client_id}" \ | |
redirect_uri=="${redirect_uri}" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
sources = import ./nix/sources.nix; | |
pkgs = import ./nixpkgs { | |
config = { | |
android_sdk.accept_license = true; | |
}; | |
}; | |
in | |
pkgs.androidenv.emulateApp { | |
name = "emulate-MyAndroidApp"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { | |
Sphere | |
} from 'react-vr'; | |
import * as CANNON from 'cannon/build/cannon.js' | |
export default class Particle extends React.Component { | |
constructor(props) { | |
this.body = new CANNON.Body({ | |
mass: 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a World | |
var world = new CANNON.World() | |
// Create a Body | |
var mass = 1 | |
var radius = 1 | |
var position = new CANNON.Vec3(0, 0, -3) | |
var shape = new CANNON.Sphere(radius) | |
var body = new CANNON.Body({ mass, position, shape }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Force file syncronization and lock writes | |
mongo admin --eval "printjson(db.fsyncLock())" | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
MONGO_HOST="prod.example.com" | |
MONGO_PORT="27017" | |
MONGO_DATABASE="dbname" | |