Skip to content

Instantly share code, notes, and snippets.

🍪
Focusing

Ben Mezger (seds) benmezger

🍪
Focusing
Block or report user

Report or block benmezger

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View debuuger.py
import sys
import time
import dis
import cProfile
import pstats
try:
from django.conf import settings
is_django = True
except ImportError:
View keybase.md

Keybase proof

I hereby claim:

  • I am benmezger on github.
  • I am seds (https://keybase.io/seds) on keybase.
  • I have a public key whose fingerprint is B456 B356 E3DC F1A6 1479 C936 AC7A 3084 3ADC 0D65

To claim this, I am signing this object:

@benmezger
benmezger / vim-cheatsheet.adoc
Created Feb 25, 2019
My personal Vim cheatsheet
View vim-cheatsheet.adoc

Vim Cheatsheet

Using Vim buffers

View postgres_queries_and_commands.sql
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), 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(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
View keybase.md

Keybase proof

I hereby claim:

  • I am benmezger on github.
  • I am seds (https://keybase.io/seds) on keybase.
  • I have a public key ASAYnXhxmRyWbbchDvkY9M8QDfNRZcqs-10lKXioijAjuQo

To claim this, I am signing this object:

@benmezger
benmezger / social-ads.lsrules
Last active May 30, 2019
Little-Snitch rules: Deny ad servers, Microsoft and Facebook
View social-ads.lsrules
{
"description" : "",
"name" : "Ads and social media",
"rules" : [
{
"action" : "deny",
"creationDate" : 1529779153.0734901,
"modificationDate" : 1529934184.9034209,
"notes" : "From Peter Lowe's ad server list; details: https:\/\/pgl.yoyo.org\/adservers\/details.php?hostname=ads03.redtube.com",
"owner" : "me",
@benmezger
benmezger / arch-linux-install
Created Feb 28, 2018 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
View arch-linux-install
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
View Effective_Engineer.md

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

View keybase.md

Keybase proof

I hereby claim:

  • I am benmezger on github.
  • I am seds (https://keybase.io/seds) on keybase.
  • I have a public key whose fingerprint is DB25 0754 ED63 9F4F E0D4 F157 1F7A 0BF6 A858 FB3B

To claim this, I am signing this object:

@benmezger
benmezger / auth_views.py
Created Dec 12, 2017 — forked from timster/auth_views.py
Class-based views for Flask
View auth_views.py
from flask import Blueprint
from flask import url_for
from flask.ext.login import current_user
from flask.ext.login import login_user
from flask.ext.login import logout_user
from flask.ext.login import login_required
from forms import LoginForm
from forms import ForgotPasswordForm
from forms import ResetPasswordForm
You can’t perform that action at this time.