Skip to content

Instantly share code, notes, and snippets.

View EvanLovely's full-sized avatar

Evan Lovely EvanLovely

View GitHub Profile
@EvanLovely
EvanLovely / OmniFocus_Selection_to_Sticky_Notifications.applescript
Last active October 24, 2016 15:58
Select items in OmniFocus, Run Script, and have [Sticky Notifications](http://instinctivecode.com/sticky-notifications/) Mac App put up notifications that are clickable back to OmniFocus task.
(*
OmniFocus to Sticky Notifications 2.0
This script will take the selected tasks (or projects as well) in OmniFocus and create indiviual reminders in Sticky Notifications. Feel free to change the "title" part of the URL from "OmniFocus" to whatever you like.
Copyright 2012 -- [Brandon Pittman](http://brandonpittman.net)
Turn Omnifocus Tasks Into Sticky Notifications with AppleScript:
http://brandonpittman.net/2012/11/turn-omnifocus-tasks-into-sticky-notifications-with-applescript/
@EvanLovely
EvanLovely / SassMeister-input.scss
Created June 3, 2014 18:42
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
@mixin color() {
color: blue;
.ie & {
color: red;
}
@EvanLovely
EvanLovely / SassMeister-input.scss
Created June 5, 2014 21:14
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.18)
// ----
.sidebar {
@media only screen and (min-width: 641px) {
.alt & {
color: red;
# Git Commit Helper
gitco() {
git status --short --branch --untracked-file=all
echo -n "Commit Message: "
read msg
git add --all :/
git commit -m "$msg"
}
# Git Checkout Helper
gitch() {
git branch
echo "Branch to checkout? (Fuzzy searching from left to right with space support)"
read branch
branches=$(git branch | egrep -i "${branch// /.*}" | tr -d ' ')
count=$(echo "$branches" | egrep -c ".")
if [ "$count" = "1" ]; then
git checkout $(echo $branches | tr -d '\n' | tr -d '*')
elif [[ "$count" = "0" ]]; then
@EvanLovely
EvanLovely / grid-debugger.scss
Last active August 29, 2015 14:05
Debug SCSS grid layouts (like Singularity) by adding the grid order and classes assigned to it over the item
.grid-container {
//debugger
counter-reset: grid-item;
[class*="grid-span-"] {
outline: dotted 1px red;
position: relative;
&:hover {
&:before,
&:after {
background: hsla(0,0%,0%,0.0);

Scss Grid Visualizer Mixin

Easily see your grid items, which order they are in, and what classes are applied to them.

A Pen by Evan Lovely on CodePen.

License.

@EvanLovely
EvanLovely / search-scss-for-extended-classes.sh
Last active August 29, 2015 14:05
Search Sass for Extended Classes and show a report
#!/bin/bash
if [[ "$1" == "" ]]; then
echo "Please pass in the path to the Sass directory to search for extended class"
exit 1
fi
dir="$1"
uses="$(grep -rn "@extend \." "$dir")"
IFS=$'\n'
classes=""
for i in $uses; do
# Recursive list of files and directories
lsr() {
if [[ "$1" == "" ]]; then
N="3"
else
N="$1"
fi
find . -maxdepth "$N"
}
# Delete all git branches merged into master
git-branch-cleanup() {
echo "Do you want to delete remote branches? [y/n]"
read remote
echo "Do you want to delete local branches? [y/n]"
read local
echo "Which branch do you want to have as the base? All branches merged into this branch will be deleted. Defaults to master."
read branchBase
git checkout $branchBase
IFS=$'\n'