Skip to content

Instantly share code, notes, and snippets.

AlinaNova21 /
Created Dec 20, 2018
Screeps Multi-Redis Setup
cp redis.conf /tmp/redis.conf
# Ensure each instance is using their own database:
sed -i -e 's@^dbfilename .*@dbfilename dump-'$NAME'.rdb@' /tmp/redis.conf
sed -i -e 's@^port .*@port '$PORT'@' /tmp/redis.conf
sed -i -e 's@^logfile .*@logfile /var/log/redis/redis-server-'$NAME'.log@' /tmp/redis.conf
sed -i -e 's@^pidfile .*@pidfile /var/run/redis-'$NAME'/' /tmp/redis.conf
sudo mv /tmp/redis.conf /etc/redis/redis-$NAME.conf
AlinaNova21 /
Last active Jun 22, 2021
Rancher 2.0, RKE, and some Raspberry Pi 3s

Kubernetes and Arm

Getting rke and Rancher setup to run kubernetes on arm is interesting. There is no official support yet via rancher, although there is interest and some work done towards those efforts. This is my attempt at getting a cluster of 3 Pis (2 3Bs and 1 3B+) provisioned and registered to a rancher 2 server.


I've successfully completed this both with Hypriot OS 1.9.0 and the arm64 builds Both times I used the same basic cloud-init setup

AlinaNova21 / RoomVisual.js
Last active Jun 16, 2017
RoomVisual structure rendering
View RoomVisual.js
/********** Moved to Screepers repo **********/
/** **/
const colors = {
gray: '#555555',
light: '#AAAAAA',
road: '#666', // >:D
energy: '#FFE87B',

Keybase proof

I hereby claim:

  • I am ags131 on github.
  • I am ags131 ( on keybase.
  • I have a public key whose fingerprint is 7FB0 1C83 7090 5C3D 82FC 15AC EBFE 6638 3E51 64DB

To claim this, I am signing this object:

View descramble.c
Scramble/descramble raw NAND dumps from the NES Classic.
plutoo 2016
Cheers to brizzo, derrek.
#include <stdio.h>
#include <string.h>
#include <stdint.h>
View allwinner-ftl.cpp
#include <cstdio>
#include <cstdint>
#include <memory>
#include <map>
#include <list>
#include <vector>
#include <set>
#include <algorithm>
#include "crypto.h"
View eventmod-test.js
module.exports = function(config) {
/** Current Way:
let onPlayerSandbox = config.engine.onPlayerSandbox;
config.engine.onPlayerSandbox = function(sandbox, userId) {
sandbox.test = function(){ return 'Hello World!' }
return onPlayerSandbox(sandbox,userId)
// Proposed way
AlinaNova21 / apitoken.js
Created Oct 27, 2016
apitoken mod for screeps server
View apitoken.js
// Add a new function to player sandbox space
// Some Super Secret Secret (32 character hex string)
const secret = Buffer.from('DEADBEEF000000000000000000000000', 'hex')
const jwt = require('./lib/jwt')
module.exports = function (config) {
if (config.engine) {
config.engine.onPlayerSandbox = function (sandbox) {
sandbox.getAPIToken = function () {
let key = generateToken(sandbox.module.user)
View modloader.js
const fs = require('fs')
const path = require('path')
const modsDir = `${__dirname}/node_modules`
module.exports = function (config) {
log('Loading mods')
getMods().forEach(mod => {
console.log(' --',