Skip to content

Instantly share code, notes, and snippets.

Adding one or more validators to the same node

This is the follow up from the Guide to join kiln for running more than one validator in the same node.

Why?

  • If we have many keys, no need to spin up the new machine, or running the new instance of geth/beacon.
  • Maybe you want to try to get the validator slashed by running the new validator with the same key

How?

@turboza
turboza / superfarm_investigation.md
Last active February 23, 2021 07:48
Investigating Superfarm IDO issues on Polkastarters
@turboza
turboza / ecto_data_not_update_experiment.ex
Last active February 5, 2019 07:50
A confusing moment for Ecto when the data in the database is not updated when doing `Repo.update()`
defmodule Experiment do
alias SampleApp.{Repo, Order}
def run do
order = Repo.get(Order, 123)
order.status # => "new"
# Put status as "pending" while doing some action
{:ok, _} =
order

Keybase proof

I hereby claim:

  • I am turboza on github.
  • I am turboza (https://keybase.io/turboza) on keybase.
  • I have a public key ASCKNEVoh1UZMz6lTnEiM7t4819Yo9feslX4TnD28EZGEwo

To claim this, I am signing this object:

@turboza
turboza / clean_node_modules.sh
Created July 31, 2017 03:48
Recursively Clean all node_modules in your projects to save a lot of space
#!/bin/sh
find . -name "node_modules" -exec rm -rf '{}' +
@turboza
turboza / omise_express_charge_card.js
Last active April 27, 2017 16:22
Sample of charging card using Node.js express
const omise = require('omise')({
secretKey: 'skey_test_...',
});
app.post('/pay', function(req, res) {
const tokenId = req.body.tokenId,
omise.charges.create({
description: 'Charge for order ID: 888',
amount: '100000', // 1,000 Baht
@turboza
turboza / 1-closure-issue.js
Last active October 3, 2016 05:07
Closure gotcha
/*
* This code snippet give an unexpected result because the closure (function inside function)
* that will preserve the local variable "i" eventhough buildAction is finished
* So every action in array will refer to the same "i" which is 4 after finishing loop.
*
* Result :(
* ```
* "item 4 = undefined"
* "item 4 = undefined"
* "item 4 = undefined"
@turboza
turboza / paramSerialize.js
Created September 20, 2016 13:14
Parameter serializer to create URL query string from nested objects.
/**
* =========================================
* paramSerialize
* =========================================
* Serialize JS object into URL Query string format.
*
* @param {object} params - { a: 10, filters: { x: 2, y: true } }
* @return {string} - '?a=10&filters[x]=2&filters[y]=true'
*/
export default function paramSerialize(params) {
@turboza
turboza / Kernel.php
Created December 27, 2015 12:46
Workaround for Laravel 5.2 ErrorException: Undefined variable: errors (May not be minimal)
<?php
// Working code for Laravel 5.2.5 - Fix no $errors return
// Error Desc: ErrorException: Undefined variable: errors
// REF: https://laracasts.com/discuss/channels/laravel/errorexception-undefined-variable-errors
namespace App\Http;