Skip to content

Instantly share code, notes, and snippets.

View hablutzel1's full-sized avatar

Jaime Hablutzel hablutzel1

  • 04:29 (UTC -05:00)
View GitHub Profile
@robstradling
robstradling / find_embedded_dodo_scts.sql
Last active March 31, 2023 01:12
Find certificates with embedded SCTs signed by Dodo's private key
-- CREATE TABLE temp_dodo_embedded_scts ( certificate_id bigint, issuer_ca_id integer );
-- GRANT SELECT ON temp_dodo_embedded_scts TO GUEST;
\timing on
\set ON_ERROR_STOP on
DO
$$DECLARE
t_minCertificateID certificate.ID%TYPE;
@joulgs
joulgs / terminal.txt
Last active September 16, 2024 04:07
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@therealmarv
therealmarv / checkopenssl.md
Last active May 31, 2024 23:28
Check OpenSSL version from Python

Open python

python

and type

>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.1g 7 Apr 2014'
@samsamm777
samsamm777 / gist:7230159
Last active April 26, 2024 13:24
PHP set private property value using reflection. This allows you to set a private property value from outside the object, great for PHPUnit testing.
<?php
$a = new A();
$reflection = new \ReflectionClass($a);
$property = $reflection->getProperty('privateProperty');
$property->setAccessible(true);
$property->setValue($a, 'new-value');
echo $a->getPrivateProperty();
//outputs:
@jamesu
jamesu / remove_duplicates.sh
Created February 1, 2012 15:37
Remove duplicate emails from an mbox
#!/bin/sh
formail -D 100000000 idcache < $1 -s > $1_new
@cdown
cdown / gist:1163649
Last active September 25, 2024 14:24
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in