Skip to content

Instantly share code, notes, and snippets.

Verifying that +lukebussey is my blockchain ID. https://onename.com/lukebussey
@lukebussey
lukebussey / gist:9b53db18d3a521b3a2c9
Created November 18, 2015 00:38
Find all URLs missing a trailing slash
href="[a-z\-\/]+\/?[a-z\-]+"
Remove utm_* and mkt_tok parameters
(?:utm_[a-z]+|mkt_tok)=[^&]+&?
Remove trailing & or single ?
\??&?$
Input: /?utm_foo=bar&utm_bar=baz&mkt_tok=123&utm_baz=qux&bar=qux&utm_qux=foo&baz=qux&foo=bar
Output: /?bar=qux&baz=qux&foo=bar
// Kill ugly querystrings
if (/^\?utm_/.test(document.location.search) && window.history.replaceState) {
window.history.replaceState({}, '', document.location.href.replace(/\?utm_.*/, ''));
}
sudo dscl . -append /Groups/wheel GroupMembership $(whoami) #to add yourself to wheel
/**
* Equal height colums by applying a class of .flex-layout to a row.
*/
.row {
&.flex-layout {
@include flex-layout;
}
}
.row {

Keybase proof

I hereby claim:

  • I am lukebussey on github.
  • I am lukebussey (https://keybase.io/lukebussey) on keybase.
  • I have a public key ASC32lgaU0tUiEa65oKa907CPeioo5vvY4rOBDg_careNwo

To claim this, I am signing this object:

@lukebussey
lukebussey / hubspot_pagination.html
Created May 9, 2017 15:27
HubSpot Pagination Template
{% set total_pages = contents.total_page_count %} <!-- sets variable for total pages -->
{% set more_pages = total_pages - current_page_num %} <!-- sets variable for how many more pages are past the current pages -->
{% if total_pages > 1 %}
<nav>
<ul class="pagination">
{% if current_page_num != 1 %}
<li><a href="{% if last_page_num=="1" %}{{ group.absolute_url }}{% else %}{{blog_page_link(last_page_num)}}{% endif %}"><i class="fa fa-angle-double-left"></i></a></li>
{% endif %}
{% if more_pages == 0 %}
{% if current_page_num - 4 == 1 %}<li><a href="{{ group.absolute_url }}">{{ current_page_num - 4 }}</a></li>{% endif %}
npm list -g --depth=0
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt -reqexts SAN -extensions SAN \
-config <(cat /System/Library/OpenSSL/openssl.cnf \
<(printf '[SAN]\nsubjectAltName=DNS:*.local'))