- The Bitcoin Core GUI can be easily translated into other languages
- We use Transifex to manage all translations (Bitcoin Project)
- The languages manifest file can be found at
src/qt/bitcoin.qrc
- Translation source files are located in
src/qt/locale/
.ts
files are generated translation source files.qm
files are compiled binary translation files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "firmata-spark/firmata-spark.h" | |
TCPServer server = TCPServer(5678); | |
TCPClient client; | |
bool new_client = true; | |
void setup() | |
{ | |
// start listening for clients |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def hex_to_bytes(s) | |
s.scan(/.{1,2}/).map{|b| b.to_i(16)} | |
end | |
def zero_bits(b) | |
n = 0 | |
if b == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- The goal of this script is to trim messages that have been processed by | |
-- all extant groups from the a given Redis stream. It returns the number | |
-- of messages that were deleted from the stream, if any. I make no | |
-- guarantees about its performance, particularly if the stream is large | |
-- and not fully processed (so a simple XTRIM isn't possible). | |
-- First off, bail out early if the stream doesn't exist. | |
if redis.call("EXISTS", KEYS[1]) == 0 then | |
return false | |
end |
With Nostr being an open protocol, and client apps being able to be developed by anyone, it's important that the client apps design around best supporting relays by minimising their client app impact. Remember, if your app has 10,000+ users, and the app's relay interaction code makes relays slower - everyone suffers.
Below are some anti-patterns (things not to do), that can help with relay performance, and ultimately make your client apps faster!
Please help build upon this list - we can move to a repo.. just add comments for now.
- Updating a subscription too often (triggers new SQL queries)
- Connecting to a relay multiple times (use a single websocket)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/nostr-protocol/nips/blob/master/57.md | |
// | |
// Quick and dirty Rust Nostr ZAP Validation | |
// | |
// anyhow = "1.0.68" | |
// bech32 = "0.9" | |
// lightning-invoice = "0.21.0" | |
// nostr-rs-relay = "0.7.2" | |
// serde_json = "~1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require 'json' | |
# class App < Sinatra::Application | |
configure do | |
enable :sessions | |
end | |
get '/' do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] | |
extern crate log; | |
use anyhow::Result; | |
use bech32::FromBase32; | |
use secp256k1::hashes::hex::ToHex; | |
use std::convert::TryFrom; | |
fn parse_tlv(data: &[u8]) -> Vec<(u8, &[u8])> { | |
let mut result = vec![]; |