Skip to content

Instantly share code, notes, and snippets.

View mattvagni's full-sized avatar

Mathias Vagni mattvagni

View GitHub Profile
@mattvagni
mattvagni / gist:5144042
Created March 12, 2013 15:50
My bash prompt thing...
export EDITOR='subl -w'
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
function make_prompt {
local BLUE="\[\033[0;34m\]"
local GREEN="\[\033[0;32m\]"
local DEFAULT="\[\033[0m\]"
@mattvagni
mattvagni / gist:6842715
Created October 5, 2013 16:07
Spam Templating Fail
Hi,
I just wanted to see if you had any thoughts on my previous email regarding partnership with #website#.
I would like to partner with #website# for a Turnkey Digital Marketing Business which supplements your #industry# Business very well and which will Massively Boost it as well.
Please visit http://TextMarketingBiz.com and checkout the 3 minute video presentation for more information. Then signup at http://textmarketingbiz.com/resellerregister.asp and Your Fre.e Branded Turnkey will be setup instantly.
signature#
#####,
#####,
#####,
#####,
#####, `#####
#####, `#####
#####, `#####
#####, `#####
#####, `#####
8888
8888
8888 .8881
8888 .8881
8888 8888 8888 f88888888; .888888888888.
8888 8888 0888, 88880;;08 .GGGG8880GGGG.
8888 8888 i888f 8888f .8881
8888 .8888 .8880 08888888 .8881
8888 :88808880 888880 8881
8888. :888888 8 8888 8888
&&&
&&& &&&&
&&& &&&&
&&& ,&&&( %&&& #&&&&( #&&&&&&&&&&&*
&&& /&&&* %&&& &&&&&&& #&&&&&&&&&&&*
&&& /&&&/ #&&&, #&&& &&&&
&&& (&&&, &&&( &&&&&&/ &&&&
&&& &&&&.&&&% (&&&&&& &&&&
&&&, &&&&&&% . &&&% &&&&
&&&&&&& &&&&& %&&&&&&&&&. .&&&&&&&
START_DIR=`pwd`
DIR="$(cd "$(dirname "$0")" && pwd)"
cd $DIR
echo -n "What's the post title?: "
read -e TITLE
# Convert to lowercase, remove punctiuation & convert spaces to Hyphens
SLUG=`echo $TITLE | tr '[:upper:]' '[:lower:]' | tr -d '[:punct:]' | tr '[:blank:]' '-'`
@mattvagni
mattvagni / bullshit
Created February 10, 2015 22:45
Magic of vars in less.
@a = 10px;
@b = 5px;
@breakpoint: (@a + @b);
// This doesn't work... only god knows why:
// @breakboint: @a + @b;
@mattvagni
mattvagni / gist:85b809ce27ad595cdb8c
Created April 16, 2015 11:01
Product Card Details
/*
Product card details,
Markup for non sale item:
----
<div class="product-card-details">
<a href="#">
<div class="product-card-details__designer">
Valentino
</div>
const name = 'b-span';
// With Create
create('div', null,
create('span', {'name': name}, create('b'))]
);
// From String
domUtils.fromString(`
<div>
import styles from './styles.css';
console.log(
`
<div class="${styles.wrapper}">
<button class="${styles.button}">
Click Me
</button>
</div>
`