Skip to content

Instantly share code, notes, and snippets.

View benmezger's full-sized avatar
:octocat:
hacking

Ben Mezger benmezger

:octocat:
hacking
View GitHub Profile
@benmezger
benmezger / vim-cheatsheet.adoc
Created February 25, 2019 13:07
My personal Vim cheatsheet

Vim Cheatsheet

Using Vim buffers

@benmezger
benmezger / postgres_queries_and_commands.sql
Created February 7, 2019 13:41 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- 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%'

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 November 29, 2020 22:56
Little-Snitch rules: Deny ad servers, Microsoft and Facebook
{
"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 February 28, 2018 18:57 — 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
# 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

Effective Engineer - Notes

What's an Effective Engineer?

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

Adopt the Right Mindsets

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 December 12, 2017 19:05 — forked from timster/auth_views.py
Class-based views for Flask
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
@benmezger
benmezger / shib.log
Created September 6, 2017 16:52
Shibboleth-IdP-3.3.1 Error log
Running Jetty:
2017-09-06 06:04:37.917:INFO::main: Logging initialized @175ms
2017-09-06 06:04:38.493:INFO:oejs.Server:main: jetty-9.3.20.v20170531
2017-09-06 06:04:38.625:INFO:oejs.AbstractNCSARequestLog:main: Opened /opt/shib-jetty-base/logs/2017_09_06.request.log
2017-09-06 06:04:38.633:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///opt/shib-jetty-base/webapps/] at interval 1
2017-09-06 06:04:46.671:INFO:oeja.AnnotationConfiguration:main: Scanning elapsed time=7154ms
2017-09-06 06:04:46.732:INFO:/idp:main: No Spring WebApplicationInitializer types detected on classpath
2017-09-06 06:04:46.946:WARN:oejs.SecurityHandler:main: ServletContext@o.e.j.w.WebAppContext@675d3402{/idp,[file:///tmp/jetty-0.0.0.0-8443-webapp-_idp-any-6175561660981786942.dir/webinf/, file:///opt/shibboleth-identity-provider-3.3.1/webapp/],STARTING}{/opt/shibboleth-idp/webapp/} has uncovered http methods for path: /*
2017-09-06 06:04:47.162:INFO:/idp:main: Initializing Spring root WebApplicationContext
2017-09-06 06:04:
sp-shibd 2017-09-04 19:14:33 INFO Shibboleth.AttributeExtractor.XML : creating mapping for Attribute urn:oid:2.5.4.3
sp-shibd 2017-09-04 19:14:33 INFO Shibboleth.AttributeExtractor.XML : creating mapping for Attribute urn:mace:dir:attribute-def:sn
sp-shibd 2017-09-04 19:14:33 INFO Shibboleth.AttributeExtractor.XML : creating mapping for Attribute urn:oid:2.5.4.4
sp-shibd 2017-09-04 19:14:33 INFO Shibboleth.AttributeExtractor.XML : creating mapping for Attribute urn:mace:rnp.br:attribute-def:brEduAffiliationType
sp-shibd 2017-09-04 19:14:33 INFO Shibboleth.AttributeExtractor.XML : creating mapping for Attribute urn:oid:1.3.6.1.4.1.15996.100.1.1.2.1
sp-shibd 2017-09-04 19:14:33 INFO Shibboleth.AttributeExtractor.XML : creating mapping for Attribute urn:mace:dir:attribute-def:eduPersonPrincipalName
sp-shibd 2017-09-04 19:14:33 INFO Shibboleth.AttributeExtractor.XML : creating mapping for Attribute urn:oid:1.3.6.1.4.1.5923.1.1.1.6
sp-shibd 2017-09-04 19:14:33 INFO Shibboleth.AttributeExtractor.XML : creating mapp