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
{ | |
"a" : "a is for apple", | |
"b" : ["b", "is", "a", "list"], | |
"c" : { | |
"d" : "dog", | |
"e" : "elephant", | |
"f" : "frog" | |
} | |
} |
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
/* | |
Playing around with how docs are genrated | |
// Indented comments are block-quoted like code# | |
foo := make(Bar, 10) | |
*/ | |
package randomDocs | |
/* |
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
package nagios2 | |
/********************************************************************* | |
* Nagios2 Command File access | |
* | |
* Copyright 2013 Bradley Dean | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
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
/* | |
What happens to the goroutines? | |
On exit (once main goes away, or if os.Exit is called) the goroutines | |
are killed off (no deferred functions are run). | |
Note - to get goroutines to quit a 'broadcast' quit channel can be | |
created - as a closed channel starts to return which means a global quit | |
channel can be included in all selects in goroutines and they'll only | |
fire when the quit channel is closed (see builting close documentation) |
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/perl | |
# filter_apache_log.pl - quick filter of apache logs to show specific fields | |
# Copyright (C) 2008 Bradley Dean <bjdean@bjdean.id.au> | |
# | |
# This program is free software: you can redistribute it and/or modify it under | |
# the terms of the GNU General Public License as published by the Free Software | |
# Foundation, either version 3 of the License, or (at your option) any later | |
# version. | |
# |
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/env python3 | |
from bs4 import BeautifulSoup | |
def decl(l): return lambda f: lambda: l + f() | |
def decp(f): return lambda: print(BeautifulSoup(f(),'html.parser').prettify(), end='') | |
@decp | |
@decl('H') | |
@decl('e') | |
@decl('l') | |
@decl('l') | |
@decl('o') |
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/env python3 | |
# A slightly animated cute (but after the deadline version) of pycon2020-RubeCodeberg.py | |
from bs4 import BeautifulSoup | |
import sys | |
import time | |
def decl(l): print(l, end=''); sys.stdout.flush(); time.sleep(0.1); return lambda f: f | |
@decl('H') | |
@decl('e') | |
@decl('l') |