I hereby claim:
- I am alinanova21 on github.
- I am ags131 (https://keybase.io/ags131) on keybase.
- I have a public key ASDBV4OoYRFoXFyqtvraiJ7wEdrLr9t_qm6aA4iQLASzzAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| NAME=$1 | |
| PORT=$2 | |
| 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'/redis-server.pid@' /tmp/redis.conf | |
| sudo mv /tmp/redis.conf /etc/redis/redis-$NAME.conf |
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 https://github.com/DieterReuter/image-builder-rpi64 Both times I used the same basic cloud-init setup
| /*********************************************/ | |
| /********** Moved to Screepers repo **********/ | |
| /** https://github.com/screepers/RoomVisual **/ | |
| /*********************************************/ | |
| const colors = { | |
| gray: '#555555', | |
| light: '#AAAAAA', | |
| road: '#666', // >:D | |
| energy: '#FFE87B', |
I hereby claim:
To claim this, I am signing this object:
| /* | |
| Scramble/descramble raw NAND dumps from the NES Classic. | |
| plutoo 2016 | |
| Cheers to brizzo, derrek. | |
| */ | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdint.h> |
| #define _CRT_SECURE_NO_WARNINGS | |
| #include <cstdio> | |
| #include <cstdint> | |
| #include <memory> | |
| #include <map> | |
| #include <list> | |
| #include <vector> | |
| #include <set> | |
| #include <algorithm> | |
| #include "crypto.h" |
| module.exports = function(config) { | |
| if(config.cli){ | |
| /** 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 |
Requirements:
From here on, the following folder structure is assumed for simplicity:
| // 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) |