Skip to content

Instantly share code, notes, and snippets.

View agramajo's full-sized avatar

Alejandro Gramajo agramajo

View GitHub Profile
@agramajo
agramajo / laliga_check.py
Created November 1, 2026 15:52
laliga_check.py: Chequea si un dominio esta bloqueado por LaLiga y apaga el proxy de Cloudflare
#!/usr/bin/env python3
"""Chequea si un dominio esta bloqueado por LaLiga y apaga el proxy de Cloudflare.
Flujo (pensado para cron cada 15 min):
1. Consulta la API. Si domain_blocked es true, guarda el estado.
2. Si en el chequeo siguiente sigue bloqueado (estado guardado + estado actual
bloqueado) y el dominio tiene el proxy activo, apaga el proxy en Cloudflare.
3. Si deja de estar bloqueado, se limpia el estado.
Variables de entorno: CF_API_TOKEN, ZONE_ID (no requeridas con --dry-run).
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!
#