Skip to content

Instantly share code, notes, and snippets.

filtercake @ superstardestroyer : ~/projects/5apps/apps/dev-blog $ bundle exec middleman
/Users/filtercake/.rvm/gems/ruby-1.9.3-p194/gems/middleman-2.0.14/lib/middleman/guard.rb:5: Use RbConfig instead of obsolete and deprecated Config.
Please install rb-fsevent gem for Mac OSX FSEvents support
Using polling (Please help us to support your system better than that.)
Using inline Guardfile.
Guard is now watching at '/Users/filtercake/projects/5apps/apps/dev-blog'
/Users/filtercake/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/psych.bundle: warning: already initialized constant ANY
/Users/filtercake/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/psych.bundle: warning: already initialized constant UTF8
/Users/filtercake/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/psych.bundle: warning: already initialized constant UTF16LE
/Users/filtercake/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.3.0/psych.bundle: warning: already initialized constant UTF16BE
@afknapping
afknapping / Guardfile
Created July 19, 2012 09:32
Guardfile as workaround for not existing sass-convert --watch
guard :shell do
watch(%r{^stylesheets-sass/}) {
`sass-convert --from sass --to scss --recursive stylesheets-sass stylesheets-scss && cp -Rv stylesheets-scss/* stylesheets/ `
}
end
@mixin columns($n)
width: ( $fallback-unit * $n * 4 ) + ( $fallback-unit * ( ($n - 1)*4 ))
width: ( $unit * $n * 4 ) + ( $unit * (( $n - 1 )*4 ))
@if $n == 12
margin: auto
clear: both
overflow: auto
@if $n < 12
margin-left: $fallback-unit
margin-left: $unit
@afknapping
afknapping / new_bashrc.sh
Created August 11, 2012 13:16 — forked from josephwecker/new_bashrc.sh
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful.
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
# Are you tired of trying to remember how darwin/mac-osx treat them differently from linux?
# Are you tired of not having your ~/.bash* stuff work the way you expect?
#
# Symlink all of the following to this file:
# * ~/.bashrc
Installing sqlite3 (1.3.6) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/filtercake/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for sqlite3.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
@afknapping
afknapping / app.js
Last active December 24, 2015 12:49
'use strict';
angular.module('tempApp', ['ui'])
.config(function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/main.html',
controller: 'MainCtrl'
})
.otherwise({
@afknapping
afknapping / svg-convert
Last active December 28, 2015 10:29
Batch convert all SVG files in current directory to PNGs with 512 pixels width. Needs svg2png (install with brew).
#!/bin/sh
# TODO test for svg2png
DIRECTORY=`pwd`
WIDTH=512 # TODO add command line parameter
for svg in $DIRECTORY/*.svg
@afknapping
afknapping / _ng-animate-helper.sass
Last active April 18, 2017 12:51
ngAnimate transition Sass mixins which work for both ng-if and ng-show
// ngAnimate helper mixins
// first it helps to have a single transition for everything. you can always fine-tune later:
$base-transition: 0.5s ease all
// this set of mixins which works for both ng-if and and ng-show:
@mixin revealTo($transition: $base-transition)
@content
  • in the CSS inspector in the Chrome DevTools
  • when i disable (or change) a property which is mapped to a source file
  • the link to the source file is destroyed

is there a way to respawn the link to the source file without reloading the page?

@afknapping
afknapping / .bashrc
Created May 14, 2014 15:59
bash aliases for wtf did i do today (and yesterday)
alias wtf-did-i-do-yesterday="echo '' && echo 'wtf did i do yesterday?' && echo '' && git log --pretty=format:'%Cred%h%Creset - %s%Creset - %Cgreen%cd%Creset ' --date=relative --all --since=2.days.ago --until=1.day.ago --author=\"$(git config user.name)\""
alias wtf-did-i-do-today="echo '' && echo 'wtf did i do today?' && echo '' && git log --pretty=format:'%Cred%h%Creset - %s%Creset - %Cgreen%cd%Creset ' --date=relative --all --since=6am --author=\"$(git config user.name)\""
# the aliases need escaped double quotes
# to try the commands directly, copy this and paste into your terminal:
# echo '' && echo 'wtf did i do today?' && echo '' && git log --pretty=format:'%Cred%h%Creset - %s%Creset - %Cgreen%cd%Creset ' --date=relative --all --since=6am --author="$(git config user.name)"