Skip to content

Instantly share code, notes, and snippets.

View nootrope's full-sized avatar
💭
Pushing bits

Alberto Gaitán nootrope

💭
Pushing bits
  • planet earth
View GitHub Profile
@nootrope
nootrope / javascript-query-string.js
Last active September 21, 2015 00:43 — forked from DavidWells/javascript-query-string.js
JavaScript :: Regex trick: Parse a query string into an object
// http://stevenbenner.com/2010/03/javascript-regex-trick-parse-a-query-string-into-an-object/
// JavaScript regex trick: Parse a query string into an object
var queryString = {};
anchor.href.replace(
new RegExp("([^?=&]+)(=([^&]*))?", "g"),
function($0, $1, $2, $3) { queryString[$1] = $3; }
);
// Usage
@nootrope
nootrope / gist:81fb593a1cf1131dd227
Last active September 21, 2015 00:44 — forked from DavidWells/gist:ed7324739059cea4ee8d
git ignore for wordpress project
# WPEngine Deploy - wp-content folder #
###########################################
# Ignore all files except for the wp-content directory
*
# Don't ignore directories themselves, else we can't add anything to the repository
!*/
# Don't ignore the the following directory
!**/wp-content/*
# or its subdirectories
@nootrope
nootrope / shrink-iframe.css
Last active September 21, 2015 00:44 — forked from DavidWells/shrink-iframe.css
Shrink Contents of Iframe with CSS
/ This shrinks content in iframes /
iframe {
-webkit-transform-origin: 0px 0px;
transform-origin: 0px 0px 0px;
-webkit-transform: scale(0.8446726572528884);
transform: scale(0.8446726572528884);
margin-left: 110.67073170731703px;
margin-top: 10px;
}
#! /bin/sh -
#
# Install OpenVPN connections for all available
# regions to NetworkManager
#
# Requirements:
# should be run as root
# python and openvpn (will be installed if not present)
#
# Usage:
@nootrope
nootrope / tmux.md
Created May 28, 2016 20:17 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

<div class="relative" style="padding-top: 56.25%">
<iframe class="absolute inset-0 w-full h-full" src="https://www.youtube-nocookie.com/embed/FMrtSHAAPhM" frameborder="0" …></iframe>
</div>