Skip to content

Instantly share code, notes, and snippets.

Alan Briolat alanbriolat

Block or report user

Report or block alanbriolat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:b18ebd802759121abcd97b1ed07652e9
www.yorkpress.co.uk##div:matches-css(z-index: 3000100)
@alanbriolat
alanbriolat / usb-offload
Last active Aug 16, 2017
/etc/network/if-up.d/usb-offload
View usb-offload
#!/bin/sh
ETHTOOL=/sbin/ethtool
[ "$IFACE" = "enx8cae4cf49551" ] || exit 0
# Disable RX checksum offloading, because it doesn't work
$ETHTOOL --offload "$IFACE" rx off
@alanbriolat
alanbriolat / crazytuple.py
Created Aug 3, 2017
namedtuple with type casts
View crazytuple.py
from collections import namedtuple
def nocast(x):
return x
def crazytuple(name, fields, casts):
_tuple = namedtuple(name, fields)
class _casting_tuple(_tuple):
@alanbriolat
alanbriolat / traceroute.sh
Last active Mar 22, 2017
Traceroute without traceroute
View traceroute.sh
T=8.8.8.8; MAX=30; for TTL in $(seq $MAX); do ping -c1 -t$TTL $T | grep -i "from"; [ "${PIPESTATUS[0]}" == 0 ]&&break; done
@alanbriolat
alanbriolat / terrible_dictConfig_defaults.py
Created Feb 6, 2016
disable_existing_loggers by default in Python logging's dictConfig() is horrible...
View terrible_dictConfig_defaults.py
import logging
import logging.config
# A logger that exists before configuration
log_a = logging.getLogger('a')
def f(name, x):
"""Test a logger."""
View gist:3e27890eb934f5d2b4cc
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^Insert::Send {Media_Prev}
^Home::Send {Media_Play_Pause}
^PgUp::Send {Media_Next}
XButton1::Send {MButton}
View keybase.md

Keybase proof

I hereby claim:

  • I am alanbriolat on github.
  • I am alanbriolat (https://keybase.io/alanbriolat) on keybase.
  • I have a public key whose fingerprint is 1301 24CE B74D 9528 F3CF CD0D 83AC 368A 2100 CE08

To claim this, I am signing this object:

@alanbriolat
alanbriolat / walk.py
Last active Dec 17, 2017
A Python function for walking and mutating a tree of mappings and sequences.
View walk.py
import collections
def identity(x):
return x
def item_identity(k, v):
return k, v
View keys.txt
Antichamber
Awesomenauts
Awesomenauts Cluck Costume
Beat Hazard Ultra
Beatbuddy: Tale of the Guardians
BioShock
BioShock 2
Broken Sword 2
Capsized
Crayon Physics Deluxe Steam Key
View Minecraft Ore Distribution.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.