Skip to content

Instantly share code, notes, and snippets.

@mikko
mikko / bot.py
Created September 5, 2019 06:12
Webots RL
from controller import Supervisor
import math
class BotController():
# Initalize the motors.
def setup(self):
self.robot = Supervisor()
self.motor_left = self.robot.getMotor("motor_left")
self.motor_right = self.robot.getMotor("motor_right")
@mikko
mikko / gist:1cc745d324458bfed12d6e752409d972
Last active October 28, 2017 19:45
Heroku app with Postgres addon
output "dns_name" {
value = "${heroku_app.example_app.web_url}"
}
# Configure the Heroku provider
provider "heroku" {
email = "[email protected]"
}
@mikko
mikko / gist:b7faa95a84cf0afec3f6
Last active April 27, 2016 23:11
NodeJS production deploy to single server
Sources:
===============
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-14-04
https://github.com/yyx990803/pod
https://www.namecheap.com/support/knowledgebase/article.aspx/1162/46/how-can-i-point-my-domain-name-to-my-home-servers-ip
Basic setup
# 0 is too far from ` ;)
set -g base-index 1
# Change default ctrl-b to ctrl-a
unbind C-b
set -g prefix C-a
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on