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 November 7, 2024 19:10
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 November 18, 2024 13:14
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
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active November 17, 2024 04:56 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export to tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

[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
});
}