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 | |
use strict; | |
sub deswappify { | |
my $pid = shift; | |
my $fh = undef; | |
my $start_addr, $end_addr; | |
if(open F, "/proc/$pid/smaps") { |
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
pv-systemd-notify() { | |
if [[ -v NOTIFY_SOCKET ]]; then | |
local f | |
function f { | |
stdbuf -oL tr '\r' '\n' | while IFS= read -r; do | |
systemd-notify --status="$REPLY" | |
done | |
} | |
pv -f 2> >(f) "$@" | |
else |
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
Started /bin/sh -c echo $JOURNAL_STREAM; stat -L -c '%n dev=%d ino=%i' /proc/self/fd/{0,1,2}. | |
test-7daa95055a8c4c89b72528a3c38df2cf.service: Deactivated successfully. | |
8:306630 | |
/proc/self/fd/0 dev=5 ino=5 | |
/proc/self/fd/1 dev=8 ino=306630 | |
/proc/self/fd/2 dev=8 ino=306630 | |
Started /bin/sh -c echo $JOURNAL_STREAM; stat -L -c '%n dev=%d ino=%i' /proc/self/fd/{0,1,2}. | |
8:312524 | |
/proc/self/fd/0 dev=5 ino=5 | |
/proc/self/fd/1 dev=8 ino=312524 |
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 main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"fmt" | |
"log" | |
"net" | |
"net/smtp" | |
"os" |
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 | |
import sys | |
import asyncio | |
import traceback | |
import sqlalchemy as sa | |
from sqlalchemy.schema import CreateTable | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.dialects.postgresql import TEXT, ARRAY |
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 main | |
import ( | |
"io" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"time" | |
) |
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 main | |
import ( | |
"bufio" | |
"io/ioutil" | |
"log" | |
"os" | |
"time" | |
"github.com/google/gopacket" |
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 main | |
import ( | |
"bufio" | |
"log" | |
"os" | |
"github.com/google/gopacket" | |
"github.com/google/gopacket/layers" | |
"github.com/google/gopacket/pcapgo" |
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 main | |
import ( | |
"bufio" | |
"log" | |
"os" | |
"github.com/google/gopacket" | |
"github.com/google/gopacket/layers" | |
"github.com/google/gopacket/pcapgo" |
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 | |
import sys | |
import pprint | |
import re | |
import subprocess | |
def get_mapping(): | |
p = subprocess.Popen(["xmodmap", "-pke"], stdout=subprocess.PIPE) |
NewerOlder