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
alias pia="sudo ip netns exec pia sudo -u peter" |
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
var fs = require('fs'), | |
util = require('util'), | |
mixin = require('./util').mixin, | |
EventEmitter = require('events').EventEmitter, | |
// Default regular expressions for log parsing | |
defaultRegexps = { | |
// Log open / log close / day change: $1 = date+time | |
logopen: /^--- Log opened (.*)$/, | |
logclose: /^--- Log closed (.*)$/, | |
daychange: /^--- Day changed (.*)$/, |
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 sys | |
import time | |
from configparser import ConfigParser | |
from irc.client import SimpleIRCClient | |
class IrcClient(SimpleIRCClient): | |
def __init__(self, nick, config): |
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 python | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
import ldap3 | |
if __name__ == '__main__': | |
import ssl | |
# ssl.CERT_REQUIRED | |
tls = ldap3.Tls(validate=ssl.CERT_NONE, version=ssl.PROTOCOL_TLSv1_2) |
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
# -*- coding: utf-8 -*- | |
import gssapi | |
import ldap3 | |
from ldap3.protocol.sasl.sasl import send_sasl_negotiation, abort_sasl_negotiation | |
NO_SECURITY_LAYER = 1 | |
INTEGRITY_PROTECTION = 2 | |
CONFIDENTIALITY_PROTECTION = 4 |
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/bash | |
set -e | |
dbname="msbob" | |
sqlite3 db.sqlite .dump >dump | |
sed -i -e "/PRAGMA/d" -e "/sqlite_sequence/d" -e "s/INTEGER PRIMARY KEY AUTOINCREMENT/SERIAL PRIMARY KEY/g" dump | |
dropdb --if-exists $dbname | |
createdb -O ircbot $dbname | |
cat dump | psql -U ircbot -q $dbname | |
rm dump |
NewerOlder