Skip to content

Instantly share code, notes, and snippets.

@larskuhtz
larskuhtz / README.md
Last active May 9, 2024 19:27
Chainweb Tx History

Chainweb Transfers

Query Chainweb transfer events within a block range for a given chain.

Usage example:

CHAIN=1 MINHEIGHT=1420000 MAXHEIGHT=14201000 bash ./tranfers.sh
@LindaOrtega
LindaOrtega / deploy-testnet-module.md
Last active September 4, 2022 04:31
Walkthrough for deploying a module to Kadena's Testnet

Deploy Module to Testnet Using Command Line

This document will walk you through how to deploy your first module to Testnet using the Command Line. To achieve this, we will use the pact command line tool's API Request formatter (pact -a) and the curl command line tool.

Step 0: Install the Prerequisites

Step 1: Create the Pact Module

We will be deploying the following pact module. For simplicity's sake, this walkthrough expects that the pact code we are deploying is not using a transaction's data field (read-keyset is one such pact function that makes use of this field). Otherwise, the accompanying YAML file will have to change. We also assume that this pact code is saved as test.pact.

@theodorosploumis
theodorosploumis / Nework_throttling_profiles.md
Last active May 23, 2024 02:55
Web development - Custom network throttling profiles
Profile download (kb/s) upload (kb/s) latency (ms)
Native 0 0 0
GPRS 50 20 500
56K Dial-up 50 30 120
Mobile EDGE 240 200 840
2G Regular 250 50 300
2G Good 450 150 150
3G Slow 780 330 200
@navid-taheri
navid-taheri / awscli-ubuntu-16.04
Last active February 24, 2020 21:46
How to install awscli on ubuntu 16.04
docker run -it ubuntu:16.04
apt-get -y update
apt-get -y upgrade
apt-get install -y python3-pip
pip3 install awscli
aws --version
aws-cli/1.14.48 Python/3.5.2 Linux/4.13.0-36-generic botocore/1.9.1
@axic
axic / stringaskey.sol
Last active July 10, 2019 00:10
How to use string as a key in a mapping in Solidity aka. how to store short strings cheape
//
// In Solidity, a mapping is like a hashmap and works with `string` like this:
// mapping (string => uint) a;
//
// However it doesn't support accessors where string is a key:
// mapping (string => uint) public a;
//
// "Internal compiler error: Accessors for mapping with dynamically-sized keys not yet implemented."
//
// An accessor returns uint when called as `a(string)`.
@AshikNesin
AshikNesin / rails-skip.md
Created September 10, 2015 11:28
Rails generator controller without tests, assets & helpers

Configuring application.rb

To turn off without having to add options:

# application.rb
config.generators.assets = false
config.generators.helper = false

While Generating Controller

@JulienBlancher
JulienBlancher / filter.d_nginx-auth.conf
Last active March 26, 2024 12:52
Fail2ban Config with Nginx and SSH
#
# Auth filter /etc/fail2ban/filter.d/nginx-auth.conf:
#
# Blocks IPs that makes too much accesses to the server
#
[Definition]
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*"
ignoreregex =
@amejiarosario
amejiarosario / rails_migration_cheatsheet.md
Created June 18, 2012 21:40
Rails Migration - Cheatsheet