Skip to content

Instantly share code, notes, and snippets.

View mattfelten's full-sized avatar

Matt Felten mattfelten

View GitHub Profile
@mattfelten
mattfelten / SassMeister-input.scss
Created June 10, 2014 18:21
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
+tr[data-display^="ALLOW IPv6 ip_proto=58"] td:first-child + td + td + td {
font-size: 0;
&:before {
content: 'ICMPv6';
@mattfelten
mattfelten / SassMeister-input.scss
Created June 4, 2014 23:28
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
.price-highlight {
font-style: normal;
font-weight: 400;
font-size: 1.2em;
# SSH Mounts
function fubarfunction() {
var1=${1-ssh};
if [ $var1 == 'mount' ]
then
fubarfunction unmount
sshfs fubar:/home/matfel/ndn/ ~/Sites/Projects/Fubar/ -o sshfs_sync
echo 'Fubar Mounted'
fubarfunction edit
elif [ $var1 == 'unmount' ]
@mattfelten
mattfelten / SassMeister-input.scss
Created May 20, 2014 21:04
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
.list-bulletpoint {
// single level of nesting
a {
color: red;
}
@mattfelten
mattfelten / SassMeister-input.scss
Created March 27, 2014 18:13
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
$em-base: 16px;
@mixin rem($property, $size, $base: $em-base) {
$unitless_values: ();
@each $num in $size {
@mattfelten
mattfelten / gist:5962631
Created July 10, 2013 00:45
Minify JS with Terminal
uglifyjs Chart.js -o Chart.min.js -c -m
@mattfelten
mattfelten / jquery.getLocationObj.js
Last active December 14, 2015 09:49
Helps with messing with URLs and grabbing their query vars.
$.getLocationObj = function(url) {
var query, match,
a = document.createElement('a'),
pl = /\+/g, // Regex for replacing addition symbol with a space
search = /([^&=]+)=?([^&]*)/g,
decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
urlParams = {},
b = {};
a.href = url;
@mattfelten
mattfelten / .bashrc
Last active December 11, 2015 07:58 — forked from TRMW/.bashrc
Forked from https://gist.github.com/4527673 which was still was broken for me. This fixed it. And now I know how to change the colors.
function parse_git_branch {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ [\1]/'
}
export PS1='\[\e[0;35m\]⌘\[\e[0m\] \[\e[0;36m\]\w/\[\e[0m\] \[\e[0;33m\]$(parse_git_branch)\[\e[0m\]'