Skip to content

Instantly share code, notes, and snippets.

View agramajo's full-sized avatar

Alejandro Gramajo agramajo

View GitHub Profile
Alice has posted a challenge: she will pay 100 BTC to anybody who has a secret
string, that once hashed using SHA256, produces a hash value with 13 leading
zero bits. Bob knows such a string, and wants to collect the prize -- but he
doesn't want to expose the secret, because then Eve, who is evesdropping on
every conversation, might beat him to it and claim the prize for herself.
How can Bob prove to Alice that he has this secret without revelaing it?
Write a circuit, in either Circom or Rust (Golang?), that makes this possible.
<?php
header( 'Content-Type: text/html' );
header( 'Cache-Control: no-cache' );
$password = 'xxx';
$hostname = 'https://xxx.com';
function purgeURL( $hostname, $port, $purgeHOST, $purgeURL )
{
$finalURL = sprintf( "%s%s", $hostname, $purgeURL );
version: '2'
services:
elasticsearch:
build:
context: elasticsearch/
args:
ELK_VERSION: $ELK_VERSION
volumes:

Keybase proof

I hereby claim:

  • I am agramajo on github.
  • I am agramajo (https://keybase.io/agramajo) on keybase.
  • I have a public key ASBtH8-rkbsSKym8MNbAGHHFVS0c532Z6u-9QZbH9ivZygo

To claim this, I am signing this object:

TESTNET Lightning (pruned)

Para instalar se utilizo un Debian 9 64 bits recien instalado de "minimal iso".

Bitcoin Core

Instalamos bitcoin-core

echo "unattended-upgrades unattended-upgrades/enable_auto_updates boolean true" | debconf-set-selections
@agramajo
agramajo / varnish_stats.pl
Created March 28, 2017 18:19
Show varnish stats
#!/usr/bin/perl
use POSIX qw( strftime );
$output = `varnishstat -1`;
%hash = $output =~ /([._\w]+)\s+(\d+)/g;
$date = strftime "%H:%M:%S", localtime;
$total_caches = $hash{'MAIN.cache_hit'} + $hash{'MAIN.cache_miss'};
@agramajo
agramajo / slack_xymon.py
Last active March 23, 2019 03:27
Xymon slack integration
import os
import json
import urllib2
url = 'https://hooks.slack.com/services/COMPLETE_ENDPOINT_HERE'
channel = '#servers'
server = os.environ.get('BBHOSTNAME')
color = os.environ.get('BBCOLORLEVEL')
msg = os.environ.get('BBALPHAMSG')
@agramajo
agramajo / test_requests.py
Created April 18, 2016 13:57
set source ip address
import socket
import requests
real_create_conn = socket.create_connection
#diferentes ips que salen por diferentes enlaces
ip1 = '192.168.1.2'
ip2 = '192.168.1.3'
#forzamos la ip1
@agramajo
agramajo / stats.pl
Created April 29, 2015 19:16
display stats by ip accounting with iptables
#!/usr/bin/perl
use strict;
# Quick display stats by ip accounting with iptables chains
# Only for linux kernel and netfilter
#
# CONFIG
# Read the source!
#
@agramajo
agramajo / generate_rev.pl
Created April 21, 2015 20:19
generate reverse zones
@nets = qw(
x.x.x
x.x.y
);
$zone = <<EOF;
\$TTL 1800
@ IN SOA ns1.xxx.com.ar. root.xxx.com.ar. 2014111104 10800 3600 604800 1800
@ IN NS ns1.xxx.com.ar.
@ IN NS webmail.xxx.com.ar.