Skip to content

Instantly share code, notes, and snippets.

View martin75carames's full-sized avatar

Martin Carames Abente martin75carames

View GitHub Profile
@edvinasbartkus
edvinasbartkus / bypass.js
Last active October 15, 2023 13:18
bypass paywall for sites like ft.com. Important: IT WILL REMOVE COOKIES (you will be logged out) AND WILL REMOVE LOCATION/SESSION STORAGE
javascript:localStorage.clear();sessionStorage.clear();(function(){var cookies=document.cookie.split("; ");for(var c=0;c<cookies.length;c+=1){var d=window.location.hostname.split(".");while(d.length>0){var cookieBase=encodeURIComponent(cookies[c].split(";")[0].split("=")[0])+'=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain='+d.join('.')+' ;path=';var p=location.pathname.split('/');document.cookie=cookieBase+'/';while(p.length>0){document.cookie=cookieBase+p.join('/');p.pop()};d.shift()}}})();window.location="https://facebook.com/l.php?u="+encodeURIComponent(window.location.href)
@evantoli
evantoli / GitConfigHttpProxy.md
Last active June 19, 2024 00:17
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@elsonidoq
elsonidoq / find_dependencies.py
Last active November 28, 2016 03:56
Find dependencies of .so files on linux machines, and copies them on a specified directory. It is very simple, and does not have a nice heuristic for picking upon different versions of the same file. However, you can use the option --skip-patterns to add a comma sepparated list of strings that should not appear on the path of the file (you can f…
import shutil
from optparse import OptionParser
import sys
import functools
import re
import subprocess
import os
READELF = '/usr/bin/readelf'
def get_dependencies(fname, skip_patterns):
@jboner
jboner / latency.txt
Last active June 19, 2024 05:25
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@devrandom
devrandom / 00README.md
Last active December 27, 2022 15:49
Building bitcoin with gitian-builder

This is obsolete, since Bitcoin Core has moved to a more modern build system.