Skip to content

Instantly share code, notes, and snippets.

View thexa4's full-sized avatar

Max Maton thexa4

  • Delft, Netherlands
View GitHub Profile
@thexa4
thexa4 / vps.init.sh
Last active September 16, 2016 20:40
apt-get update
apt-get dist-upgrade --yes
apt-get install lsb-release ca-certificates --yes
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-jessie.deb
dpkg -i puppetlabs-release-pc1-jessie.deb
apt-get update
apt-get install puppet-agent --yes
/opt/puppetlabs/bin/puppet agent --test --waitforcert 30
@thexa4
thexa4 / showbest.js
Last active October 1, 2025 17:13
For use with spaceplan
// Paste in console
var clickBestThing = function(){
var things = [...document.querySelectorAll("#manufacture__container > div")].map(function(e){
var res = {e};
[...e.getElementsByTagName("span")].map(function(s){
res[s.id] = +s.innerText.replace(/[^0-9]/g, '')
})
if(e.id === "item__spudGun" || e.id === "item__potatoLauncher") res.powerGain *= 1000;
res.score = res.cost * (powerGain + res.powerGain)/res.powerGain;
@thexa4
thexa4 / commit
Last active August 29, 2015 14:04
Add schemas to ldap
#!/bin/sh
slapcat -n0 -F /etc/ldap/ldif > /tmp/schema.ldif
#warning, ignores errors
slapadd -n0 -F -c /etc/ldap/slapd.d -l /tmp/schema.ldif