Skip to content

Instantly share code, notes, and snippets.

View cryptocode's full-sized avatar

cryptocode

View GitHub Profile

Synchronized Output

Synchronized output is merely implementing the feature as inspired by iTerm2 synchronized output, except that it's not using the rare DCS but rather the well known SM ? and RM ?. iTerm2 has now also adopted to use the new syntax instead of using DCS.

Semantics

When rendering the screen of the terminal, the Emulator usually iterates through each visible grid cell and renders its current state. With applications updating the screen a at higher frequency this can cause tearing.

This mode attempts to mitigate that.

import tarfile
import hashlib
import os
import sys
import requests
import io
def compute_hash(tar_path, is_url=False):
if is_url:
response = requests.get(tar_path)
// Luuk's bf jit, but for macos
// Changes: syscalls and page alignment of mmap size input
// Original: https://github.com/Luukdegram/bfj
const std = @import("std");
const os = std.os;
const mem = std.mem;
const Allocator = mem.Allocator;
const page_size = std.mem.page_size;

Increasing max open file descriptors on a Droplet w/Ubuntu

Add session required pam_limits.so to these two files:

/etc/pam.d/common-session
/etc/pam.d/common-session-noninteractive

Next, edit

Keybase proof

I hereby claim:

  • I am cryptocode on github.
  • I am cryptocode (https://keybase.io/cryptocode) on keybase.
  • I have a public key ASBF3_THp5WWoXh3BWyRUgQZ-EQxBGRHK93QtEL4nQ0FlAo

To claim this, I am signing this object:

Below is a sample /etc/nginx/sites-available/default configuration for using nginx as a reverse proxy for the Nano Pow Server
When doing this on a VPS, it's almost always necessary to increase the maximum open file limit.
Replace port numbers, backend host/ip and domain names as necessary.
======================= /etc/nginx/sites-available/default =======================
server {
[node]
# Limits number of active elections before dropping will be considered (other conditions must also be satisfied)
# type:uint64,[250..]
active_elections_size = 50000
# Enable or disable local host peering
# type:bool
allow_local_peers = false
diff --git a/rai/node/node.cpp b/rai/node/node.cpp
index b9f5681e..caaae4e0 100644
--- a/rai/node/node.cpp
+++ b/rai/node/node.cpp
@@ -1966,13 +1966,13 @@ void rai::node::stop ()
{
block_processor_thread.join ();
}
+ vote_processor.stop ();
active.stop ();
{
"quorum_delta": "45422617064212959417758022394180207600",
"online_weight_quorum_percent": "50",
"online_weight_minimum": "60000000000000000000000000000000000000",
"online_stake_total": "90845234128425918835516044788360415294",
"peers_stake_total": "17351372919081579466355701326973505015",
"peers": {
"xrb_3dmtrrws3pocycmbqwawk6xs7446qxa36fcncush4s1pejk16ksbmakis78m": "9107808973691359711944923976215362496",
"xrb_1anrzcuwe64rwxzcco8dkhpyxpi8kd7zsjc1oeimpc3ppca4mrjtwnqposrs": "2317507666652655328321497869190058609",
"xrb_3rropjiqfxpmrrkooej4qtmm1pueu36f9ghinpho4esfdor8785a455d16nf": "1901034891075657677525740819617843472",