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 / dircolors
Created November 16, 2016 22:01
dircolors-monokai
# Monokai color theme for the color GNU ls utility.
# Designed for dircolors (GNU coreutils) 5.97
#
# This file was largely inspired by seebi/dircolors-solarized on github.
#
# How the colors were selected:
# - Terminal emulators often have an option typically enabled by default that makes
# bold a different color. It is important to leave this option enabled so that
# you can access the entire 16-color palette, and not just 8 colors.
# - We favor universality over a greater number of colors. So we limit the number
@benmezger
benmezger / gist:222359c5f3d5b061a579554cf44a4bf3
Created May 11, 2017 19:21
If a root user is executing `rm`, make sure it does it safe.
[ $UID = 0 ] && \
alias rm='rm -i' && \
alias mv='mv -i' && \
alias cp='cp -i'

Keybase proof

I hereby claim:

  • I am benmezger on github.
  • I am benmezger (https://keybase.io/benmezger) on keybase.
  • I have a public key whose fingerprint is C473 DDC9 D1B1 40AF 2051 1CF6 18C4 6052 1688 92F7

To claim this, I am signing this object:

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@benmezger
benmezger / fat16.c
Created July 11, 2017 20:14
move filename to a fat16 image
int write_dir(FILE *fp, char *fname, struct fat_dir *dir){
strncpy((char *) dir->name, (char *) fname, sizeof(fname));
if (fwrite(dir, 1, sizeof(struct fat_dir), fp) <= 0)
return -1;
return 0;
}
int write_data(FILE *fp, char *fname, struct fat_dir *dir, struct fat_bpb *bpb){
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
@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:
@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

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:

Effective Engineer - Notes

What's an Effective Engineer?

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

Adopt the Right Mindsets