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
Sauna | |
3 Reviews | |
5 | |
/ | |
5 | |
by AustinH |
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 debian:9 | |
RUN apt-get update && apt-get install -y gdal-bin | |
RUN apt-get install -y python | |
RUN apt-get install -y p7zip mapserver-bin wget | |
COPY mapgen /mapgen | |
RUN mkdir -p /script | |
COPY gen-kebne.py /script/gen-kebne.py |
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
$ netplan ip leases eth0 | |
Traceback (most recent call last): | |
File "/usr/sbin/netplan", line 23, in <module> | |
netplan.main() | |
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main | |
self.run_command() | |
File "/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command | |
self.func() | |
File "/usr/share/netplan/netplan/cli/commands/ip.py", line 57, in run | |
self.run_command() |
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
Why does test.sh (see below) fail with: | |
$ sh test.sh | |
+ export 'TESTVAR=FOO BAR BAZ' | |
+ TESTVAR='FOO BAR BAZ' | |
++ for E in TESTVAR | |
+++ eval echo '$TESTVAR' | |
++++ echo FOO BAR BAZ | |
++ echo 'TESTVAR='\''FOO BAR BAZ'\''' | |
+ 'TESTVAR='\''FOO' BAR 'BAZ'\''' echo foo |
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
tazle@tin:~$ command /sbin/ipset list ADDRv4_switch0 | grep -A1 Members | |
Members: | |
10.0.1.1 | |
tazle@tin:~$ command /sbin/ipset list NETv4_switch0 | grep -A1 Members | |
Members: | |
0.0.1.0/24 |
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 itertools | |
import re | |
def loseargs(f): | |
def g(*args, **kwargs): | |
return f() | |
return g | |
def serial_replace(template): | |
for r in itertools.count(1): |
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 sys | |
from pdfminer.pdfparser import PDFParser | |
from pdfminer.pdfdocument import PDFDocument | |
from pdfminer.pdfpage import PDFPage | |
from pdfminer.pdfpage import PDFTextExtractionNotAllowed | |
from pdfminer.pdfinterp import PDFResourceManager | |
from pdfminer.pdfinterp import PDFPageInterpreter | |
from pdfminer.pdfdevice import PDFDevice | |
from pdfminer.converter import PDFPageAggregator | |
from pdfminer.layout import LAParams |
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
def treematch(node, match, nomatch, extract): | |
if match(node): | |
yield extract(node) | |
elif nomatch(node): | |
return | |
else: | |
for subnode in node: | |
for result in treematch(subnode, match, nomatch, extract): | |
yield result |
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 sys | |
from pdfminer.pdfparser import PDFParser | |
from pdfminer.pdfdocument import PDFDocument | |
from pdfminer.pdfpage import PDFPage | |
from pdfminer.pdfpage import PDFTextExtractionNotAllowed | |
from pdfminer.pdfinterp import PDFResourceManager | |
from pdfminer.pdfinterp import PDFPageInterpreter | |
from pdfminer.pdfdevice import PDFDevice | |
from pdfminer.converter import PDFPageAggregator | |
from pdfminer.layout import LAParams |
NewerOlder