This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import logging.config | |
# A logger that exists before configuration | |
log_a = logging.getLogger('a') | |
def f(name, x): | |
"""Test a logger.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
# ... other default site stuff, document root, etc. ... | |
location ~ ^/~(?<userdir_user>.+?)(?<userdir_uri>/.*)?$ { | |
alias /home/$userdir_user/public_html$userdir_uri; | |
index index.html index.htm index.php; | |
autoindex on; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void do_the_thing(int*, double*, double*, double*); | |
extern const int blah; | |
int main(int argc, char **argv) | |
{ | |
int n = 5; | |
double x[5] = {1, 2, 3, 4, 5}; | |
double y[5] = {10, 20, 30, 40, 50}; | |
double z[5]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import collections | |
def identity(x): | |
return x | |
def item_identity(k, v): | |
return k, v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
www.yorkpress.co.uk##div:matches-css(z-index: 3000100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import getopt, sys, pprint | |
pp = pprint.PrettyPrinter(indent=4) | |
shortopts = 'h:l:r:' | |
locals = [] | |
remotes = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ETHTOOL=/sbin/ethtool | |
[ "$IFACE" = "enx8cae4cf49551" ] || exit 0 | |
# Disable RX checksum offloading, because it doesn't work | |
$ETHTOOL --offload "$IFACE" rx off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import namedtuple | |
def nocast(x): | |
return x | |
def crazytuple(name, fields, casts): | |
_tuple = namedtuple(name, fields) | |
class _casting_tuple(_tuple): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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} |
NewerOlder