This file contains 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 | |
slapcat -n0 -F /etc/ldap/ldif > /tmp/schema.ldif | |
#warning, ignores errors | |
slapadd -n0 -F -c /etc/ldap/slapd.d -l /tmp/schema.ldif |
This file contains 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
// 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; |
This file contains 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
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 |
This file contains 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
git filter-branch --prune-empty --tree-filter ' | |
git lfs track "*.bsp" | |
git lfs track "*.vtf" | |
git lfs track "*.wav" | |
git lfs track "*.mp3" | |
git lfs track "*.mdl" | |
git lfs track "*.vtx" | |
git lfs track "*.vvd" | |
git lfs track "*.phy" | |
git lfs track "*.bik" |
This file contains 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 | |
# postinst script for empires-gitlab-runner | |
# | |
# see: dh_installdeb(1) | |
set -e | |
# summary of how this script can be called: | |
# * <postinst> `configure' <most-recently-configured-version> | |
# * <old-postinst> `abort-upgrade' <new version> |
This file contains 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
while true; do | |
sleep 5m; | |
if ceph -s | grep -q 'are blocked'; then | |
echo 'skip, blocked' | |
continue | |
fi | |
if ceph -s | grep -q 'osd down'; then |
This file contains 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 copy | |
class ParallelPlayer | |
def __init__(self, prototype, concurrent_games): | |
self.prototype = prototype | |
self.instances = [None] * concurrent_games | |
self.seen_hand = [False] * concurrent_games | |
def start_game(self, game_id): | |
self.instances[game_id] = copy.deepcopy(self.prototype) |
This file contains 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 | |
(printf "puts "; cat) | tr -d "\n" | ruby |
This file contains 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
function printf { | |
declare parameter format. | |
local sentinel to lex(). | |
local args to list(). | |
declare parameter last to sentinel. | |
local test to last. | |
until test = sentinel { | |
args:add(test). | |
declare parameter last to sentinel. |
This file contains 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
bool _autoPowerSave = true; | |
IMyTextSurface _cockpitSurface; | |
RectangleF _viewport; | |
List<IMyCargoContainer> _containers = new List<IMyCargoContainer>(); | |
List<IMyEntity> _storages = new List<IMyEntity>(); | |
IMyGasGenerator _splitter; | |
List<IMyBatteryBlock> _batteries = new List<IMyBatteryBlock>(); |
OlderNewer