Skip to content

Instantly share code, notes, and snippets.

{"window":{"width":1920,"height":1191},"event_log":[{"selector":"document","type":"scroll","scrollTop":15,"scrollLeft":0,"timeStamp":15799.70000003092},{"selector":"document","type":"scroll","scrollTop":26,"scrollLeft":0,"timeStamp":15829.899999951944},{"selector":"document","type":"scroll","scrollTop":43,"scrollLeft":0,"timeStamp":15846.099999906495},{"selector":"document","type":"scroll","scrollTop":52,"scrollLeft":0,"timeStamp":15862.399999924004},{"selector":"document","type":"scroll","scrollTop":73,"scrollLeft":0,"timeStamp":15879.20000002347},{"selector":"document","type":"scroll","scrollTop":90,"scrollLeft":0,"timeStamp":15895.79999999702},{"selector":"document","type":"scroll","scrollTop":136,"scrollLeft":0,"timeStamp":15912.699999926612},{"selector":"document","type":"scroll","scrollTop":161,"scrollLeft":0,"timeStamp":15929.799999982119},{"selector":"document","type":"scroll","scrollTop":206,"scrollLeft":0,"timeStamp":15945.99999993667},{"selector":"document","type":"scroll","scrollTop":232,"scrollLe
@marclipovsky
marclipovsky / sass_sprite_name_processor.rb
Created September 5, 2014 18:04
Rails/Compass - Rename Compass generated sprite filenames without hash.
# encoding: UTF-8
# NOTE: Removing the Compass-generated hash from Compass-generated sprite file
# names so that git history doesn't get jacked up.
SPRITE_FILE_NAMES = []
# Rename sprites to remove the Compass-generated hash and move it up 1 directory
Rails.application.config.compass.on_sprite_saved do |filename|
if File.exists?(filename)
@marclipovsky
marclipovsky / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@marclipovsky
marclipovsky / git-bash-prompt
Last active January 4, 2022 00:48
git-bash-prompt
# Get's the current git branch
function parse_git_branch
{
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo -e "▸"${ref#refs/heads/}
}
# Checks to see if there are uncommitted files
function git_status
@marclipovsky
marclipovsky / trello-for-fluidapp.js
Created January 18, 2013 18:17
Trello Growl and New Notification Badge Count Support for FluidApp
(function () {
if (!window.fluid) {
alert("This script is meant to be run in Fluid! You should disable it.");
return;
}
window.fluid.dockBadge = '';
setInterval(newNotif, 500);
@marclipovsky
marclipovsky / gist:4475924
Created January 7, 2013 15:42
bash-git-branch-status
# Get's the current git branch
function parse_git_branch
{
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
}
# Checks to see if there are uncommitted files
function git_status
{
@marclipovsky
marclipovsky / template-widgets.html
Created December 7, 2012 17:29
sample email template
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Campaign Monitor Newsletter</title>
<style>
a:hover {
text-decoration: underline !important;
@marclipovsky
marclipovsky / scss.rb
Created October 22, 2012 03:52
SCSS HAML Filter
# encoding: UTF-8
module Haml::Filters
module Scss
include Base
lazy_require 'sass/plugin'
def render (text)
"<style>\n/*<![CDATA[*/\n" + ::Sass::Engine.new(text, ::Sass::Plugin.engine_options.merge(syntax: :scss)).render + "\n/*]]>*/\n</style>"
end
@marclipovsky
marclipovsky / .bash_profile
Created September 6, 2012 19:10
Include branch name (and other info) in my bash prompt
# Get's the current git branch
function parse_git_branch
{
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
}
# Checks to see if there are uncommitted files
function git_status
{
FFFFFFF
Failures:
1) Person merging two people should return the winner
Failure/Error: @result = Person.merge(@winner, @loser)
NoMethodError:
undefined method `merge' for #<Class:0x007f8c3c3fb888>
# /Users/macuser/.rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.2.3/lib/active_record/dynamic_matchers.rb:50:in `method_missing'
# /Users/macuser/Sites/forked gems/people/spec/models/person_spec.rb:15:in `block (3 levels) in <top (required)>'