Skip to content

Instantly share code, notes, and snippets.

@christophlsa
christophlsa / postgres_queries_and_commands.sql
Created February 19, 2018 15:39 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@christophlsa
christophlsa / damazon.py
Last active August 29, 2015 14:09 — forked from zakx/damazon.py
#!/usr/bin/python
# setup: pip install requests beautifulsoup4
from decimal import Decimal
import requests
from bs4 import BeautifulSoup
import sys
import getpass
#!/usr/bin/python
import psycopg2
import pprint
def main():
sql = "SELECT id FROM member WHERE invite_code IN ("
with open("austritte.txt", "r") as fobj:
for line in fobj:
if line != "":
#!/bin/sh
for i in {1..65535}; do curl -s -m 5 portquiz.net:$i &> /dev/null || echo "port $i blocked"; done

Keybase proof

I hereby claim:

  • I am christophlsa on github.
  • I am synex (https://keybase.io/synex) on keybase.
  • I have a public key whose fingerprint is A9D7 973E 448F 921D B96F 1673 FEF2 F3A2 15C7 C0C9

To claim this, I am signing this object:

diff -upr a/app/main/event/_list.lua b/app/main/event/_list.lua
--- a/app/main/event/_list.lua 2014-04-05 18:47:30.379024179 +0200
+++ b/app/main/event/_list.lua 2014-04-05 18:49:46.651024196 +0200
@@ -207,7 +207,7 @@ filters.content = function()
text = _"Show older events",
module = request.get_module(),
view = request.get_view(),
- id = for_unit and for_unit.id or for_area and for_area.id,
+ id = for_unit and for_unit.id or for_area and for_area.id or for_member and for_member.id,
params = {
from twitter import *
import json
"""
{
"CONSUMER_KEY": "",
"CONSUMER_SECRET": "",
"OAUTH_TOKEN": "",
"OAUTH_SECRET": ""
}
#!/usr/bin/python
from gi.repository import Gtk, GLib, Pango
from time import sleep
import threading
import random
class PyRandomWindow(Gtk.Window):
def __init__(self):
@christophlsa
christophlsa / Aufzeichnung.txt
Created October 14, 2013 20:15
Audacity Batchprocess (~/.audacity-data/Chains/Aufzeichnung.txt)
TruncateSilence: Db="-70 dB" Minimum=200 Duration=2000 Compress=10,000000
Compressor: Threshold=-35,000000 NoiseFloor=-70,000000 Ratio=10,000000 AttackTime=0,100000 DecayTime=1,000000 Normalize=yes UsePeak=yes
#!/usr/bin/python
# -*- coding: utf-8 -*-
from email.parser import Parser
import os, re, csv, argparse, sys
class EMailBounce(object):
def __init__(self, filename):
self.Delivery_status = {}
self.Recipient = ''