Skip to content

Instantly share code, notes, and snippets.

Stefan Bauckmeier emrox

Block or report user

Report or block emrox

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 git emoji.md

Git Commit Emojis

  • ⭐️ (feat) for commits related to adding new features.
  • 🛠 (fix) for commits related to fixing broken code.
  • 🍺 (chore) for commits that are just chores.
  • 📝 (doc) for commits related to adding and maintaining documentation.
  • ♻️ (refa) for commits related to refactoring code and making it work better.
  • 🔍 (test) for commits related to writing or fixing tests.
  • 🌈 (style) for commits related to making your code or your app beautiful with style changes.
@emrox
emrox / how-to-set-up-stress-free-ssl-on-os-x.md
Created Oct 25, 2017 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine
View how-to-set-up-stress-free-ssl-on-os-x.md

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@emrox
emrox / production_log_stats.pl
Created Apr 14, 2016
Rails production log partial timing
View production_log_stats.pl
#!/usr/bin/perl
# use with: cat producion.log | perl production_log_stats.pl
use warnings;
use strict;
use List::Util qw(sum);
my $filestats_ref = ();
View keybase.md

Keybase proof

I hereby claim:

  • I am emrox on github.
  • I am emrox (https://keybase.io/emrox) on keybase.
  • I have a public key whose fingerprint is EB76 E532 647A 2F64 61D4 0A25 DB7B 9CB7 613A FDEA

To claim this, I am signing this object:

@emrox
emrox / gist:4351973
Created Dec 21, 2012
A One-Liner for checking Links in a .txt File for their returned Status-Codes (200, 301, 404, ...)
View gist:4351973
cat linklist.txt | xargs -i~ curl -o /dev/null --silent --write-out '~ %{http_code}\n' \~ > linklist.checked.txt
@emrox
emrox / META Tag Regex Matching
Created Dec 20, 2012
Regular Expression for matching META Tags from a HTML Source
View META Tag Regex Matching
<meta\s*(?:(?:\b(?:\w|-)+\b\s*)=\s*(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')\s*)*\/?>
- empty Meta Tags
- XHTML Styled Meta Tags (<meta />) and normal HTML Meta Tags (<meta>)
- single and double quote marks are supported
- Values can contain escaped quote marks (<meta name="test\"name" />)
@emrox
emrox / pattern.xml
Created Jan 21, 2012 — forked from rubiii/pattern.xml
reuse xml schema pattern via nokogiri
View pattern.xml
<xsd:pattern xmlns:xsd="http://www.w3.org/2001/XMLSchema" value="\d{3}-[A-Z]{2}"/>
You can’t perform that action at this time.