Skip to content

Instantly share code, notes, and snippets.

@mariofink
mariofink / CSS3 gradient button
Created October 12, 2011 12:33
COMPASS mixin: CSS3 gradient button
@import "compass/reset";
@import "compass/css3";
@mixin gradientButton($baseColour: #eee, $textColour: #333) {
$darker-1: darken($baseColour, 7%); /* ~#ddd */
$darker-2: darken($baseColour, 15%); /* ~#ccc */
$darker-3: darken($baseColour, 20%); /* ~#bbb */
$darker-4: darken($baseColour, 34%); /* ~#999 */
$active-1: darken($baseColour, 27%); /* ~#aaa */
@mariofink
mariofink / dabblet.css
Created August 29, 2012 18:20
CSS3 transforms & transitions
/**
* CSS3 transforms & transitions
*/
body {
font-family: sans-serif;
}
.box {
background: #bada55;
border-radius: 1em;
width: 15em;
@mariofink
mariofink / Round(ed)-badges.markdown
Created February 18, 2014 13:58
A Pen by Mario Fink.
@mariofink
mariofink / mydotfiles
Created March 5, 2014 19:04
My dot files
# .aliases
alias search='find . -iname '
alias changelog='svn log -l 10 -v | more'
alias mychangelog="svn log -l 50 | sed -n '/mario.fink/,/-----$/ p'"
alias uservm='source /Users/mariofink/.rvm/scripts/rvm'
########################################################################
# .profile
PS1="\n\w\n> "
# Editors/IDEs #
################
*.swp
.idea
# Node/NPM #
############
node_modules
npm-debug.log
#! /usr/bin/env bash
#
# checks how many times SASS variables have been used inside a project
#
if [ -z "$1" ]; then
echo "Please specify a directory as the first argument."
exit 1
fi
if [ ! -d "$1" ]; then
@mariofink
mariofink / gist:3dbeb9e206933885bab8
Created May 3, 2014 15:27
SASS Find unused variables
#! /usr/bin/env bash
#
# checks your scss files for unused variables
#
if [ -z "$1" ]; then
echo "Please specify a directory as the first argument."
exit 1
fi
if [ ! -d "$1" ]; then
module.exports = function (grunt) {
grunt.initConfig({
/**
* Build JS code from AMD modules with Browserify
*/
browserify: {
testspecs: {
src: ["scripts/test/spec/<%= browserifySpecs %>.js"],
dest: 'scripts/test/specs-built.js'
}

VIM cheatsheet

Insert

  • i – before cursor
  • a – after cursor
  • O – above current line
  • o – below current line
  • I – beginning of line
  • A – end of line
@mariofink
mariofink / pre-push.sh
Created April 3, 2017 12:29
Git pre-push hook to avoid pushing tags
#!/bin/sh
while read -d $'0' arg ; do
echo $arg
if [[ $arg == *"/tags/"* ]]; then
echo "Pushing tags is not allowed!"
exit 1
fi
done