Skip to content

Instantly share code, notes, and snippets.

View guiarn's full-sized avatar

Guido Arnau guiarn

View GitHub Profile
@cr0hn
cr0hn / pub_sub.py
Created June 21, 2016 14:05
Simple producer / consumer using native asyncio Python >= 3.3 module, using non-blocking Queues and non-blocking system commands calls
# -*- coding: utf-8 -*-
import asyncio
@asyncio.coroutine
def cmd_runner(cmd):
# cmd = "ls"
print(cmd)
@bishboria
bishboria / springer-free-maths-books.md
Last active March 24, 2025 13:36
Springer made a bunch of books available for free, these were the direct links
#!/bin/sh
# Small script to gather data from picosat and your own SAT solver
# Useful for LI prac 01
#
# Example usage:
# ./li-results.sh > out.txt
# Your solver
BIN=./solver
@Lazza
Lazza / README.md
Last active October 16, 2024 08:17
VPNGate Python script

This script is NOT MAINTAINED

This snippet of code was posted in 2014 and slightly revised in 2016 and 2017. It was more of a quick'n'dirty script than a polished tool. It is made only for Linux and in Python 2, which has since become outdated.

I currently do not use it, and I suggest you avoid it as well. Please do not expect support for using this script.

🔥 If you need an alternative, @glaucocustodio has kindly suggested EasyVPN in this comment.

The rest of the README is left for historical purposed.

@staltz
staltz / introrx.md
Last active May 4, 2025 15:01
The introduction to Reactive Programming you've been missing
@takeshixx
takeshixx / hb-test.py
Last active April 14, 2025 17:04
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <[email protected]>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@eevee
eevee / spabs.md
Last active February 20, 2024 08:29
tabs to spaces
@lamberta
lamberta / duckduckgo.xml
Last active July 17, 2021 14:11
Firefox search plugin using DuckDuckGo and auto-complete from Startpage.
<!-- DuckDuckGo HTTPS search using Startpage suggestions.
- Url params: https://duckduckgo.com/params
- OSX location: Firefox.app/Contents/MacOS/browser/searchplugins
- In about:config, browser.search.defaultenginename = DuckDuckGo -->
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>DuckDuckGo</ShortName>
<Description>DuckDuckGo Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">https://duckduckgo.com/favicon.ico</Image>
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs