Skip to content

Instantly share code, notes, and snippets.

View brunneis's full-sized avatar

Rodrigo Martínez brunneis

View GitHub Profile
@GermanAizek
GermanAizek / README.md
Last active May 6, 2024 02:13
Openwrt - Extend disk space for apps

Instructions for expanding space for openwrt programs. In most cases, 2Gb will be enough. We will install the necessary packages for working with USB devices

root@OpenWrt:~# opkg update
root@OpenWrt:~# opkg install nano kmod-usb-core block-mount kmod-fs-ext4 kmod-usb-storage-extras e2fsprogs blkid

After install fdisk package

@rpanachi
rpanachi / how-to-fix-macos-mojave-battery-draining-issue.md
Last active April 20, 2023 13:31
How to Fix macOS Mojave Battery Draining Issue
@harding
harding / qc-upgrade-path.md
Created July 23, 2018 11:44
Description of Tim Ruffing's upgrade path to post-quantum in presence of QC attackers

Background: future fast Quantum Computers (QCs) are hypothesized to be much faster at solving various forms of the Discrete Log Problem (DLP) than classical computers (e.g. what we use now). Bitcoin uses the DLP in what's called a trapdoor function: a function that's easy to compute one way (a private key generating a public key) but hard to compute the other way (using a public key to recover the original private key). Fast QCs break that trapdoor, hypothetically allowing the operator of the QC to steal the bitcoins from anyone whose public key is publicly known.

@dideler
dideler / bot.rb
Last active April 17, 2024 08:40
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@brunneis
brunneis / deepin-aerospike-python-client-pip.md
Last active November 4, 2019 09:39
Install Aerospike Python client through pip in Deepin Linux 15.5
  1. Temporarily change the following properties at /etc/os-release

    • VERSION_ID="9"
    • ID=debian
  2. Execute pip install aerospike


Other fixes:

// 1. Install the leveldown:
// npm install leveldown
// 2. Change the path
// 3. Run in cmd/powershell/bash
// node fix_broken_contracts.js
var leveldown2 = require("leveldown");
var myCallback = function(ld) {
console.log('LD: '+ld);
};
@sirosen
sirosen / sign.py
Last active January 25, 2024 20:46
Sign and Verify Using RSA via cryptography (python)
"""
RSA Sign a Message using a private key
Just turns this example into a script:
https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/#signing
"""
import sys
import hashlib
import base64
[root@kafka-a-01 /]# /opt/kafka_current/bin/kafka-console-consumer.sh
The console consumer is a tool that reads data from Kafka and outputs it to standard output.
Option Description
------ -----------
--blacklist <blacklist> Blacklist of topics to exclude from
consumption.
--bootstrap-server <server to connect REQUIRED (unless old consumer is
to> used): The server to connect to.
--consumer-property <consumer_prop> A mechanism to pass user-defined
properties in the form key=value to
@wesbos
wesbos / async-await.js
Created February 22, 2017 14:02
Simple Async/Await Example
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}