Skip to content

Instantly share code, notes, and snippets.

@RobertAudi
RobertAudi / index.html
Created October 13, 2016 14:44
Styles For Ordered List Item Numbers
<section class="module">
<h1 class="module__heading module__heading--a">Circled</h1>
<ol class="custom-bullet custom-bullet--a">
<li>Lorem ipsum dolor sit amet</li>
<li>Consectetur adipiscing elit</li>
<li>Integer molestie lorem at massa</li>
<li>Facilisis in pretium nisl aliquet</li>
<li>Nulla volutpat aliquam velit</li>
@RobertAudi
RobertAudi / inspector.rb
Created September 21, 2016 12:20 — forked from ubermajestix/inspector.rb
Override inspect on ruby objects
# When an RSpec test like this fails,
#
# @my_array.should == [@some_model, @some_model2]
#
# RSpec will call inspect on each of the objects to "help" you figure out
# what went wrong. Well, inspect will usually dump a TON OF SHIT and make trying
# to figure out why `@my_array` is not made up of `@some_model` and `@some_model2`.
#
# This little module and technique helps get around that. It will redefine `inspect`
# if you include it in your model object.
#
# Generate a unique token before the creating a
# new record. Option to specify an array of
# attributes as predicates for the uniqueness check.
# The tokenable attribute is always appended to
# the list of predicates.
#
# Example usage in a model:
#
# class Contribution < ActiveRecord::Base
@RobertAudi
RobertAudi / rpc-spec.md
Created September 14, 2014 12:11
Transmission RPC Spec. Converted to Markdown, 'cause it's unreadable otherwise...
  1. Introduction ===============

This document describes a protocol for interacting with Transmission sessions remotely.

1.1 Terminology

The JSON terminology in RFC 4627 is used.

@RobertAudi
RobertAudi / autoenv
Last active August 29, 2015 14:05
My take on directory-specific environments on the command-line
#!/usr/bin/env zsh
#
# USAGE: autoenv [action]
#
# Actions:
# up (aliased to u)
# down (aliased to d)
#
error() { echo "$@" 1>&2 }
@RobertAudi
RobertAudi / ideavimrc
Created July 28, 2014 08:46
System clipboard support in IdeaVim
nnoremap yy "+yy
vnoremap y "+y
nnoremap p "+p
vnoremap p "+p
nnoremap P "+P
vnoremap P "+P
set hlsearch
highlight CurSearch guibg=green
nnoremap <silent> N N:silent! call HighlightCurrentMatch()<CR>
nnoremap <silent> n n:silent! call HighlightCurrentMatch()<CR>
function! HighlightCurrentMatch()
let col = col(".") - 1
let endCol = searchpos(getreg("/"), "cne")[1] + 1
let line = line(".")
let matchPat = '/\%' . line . 'l\%>' . col . 'c\%<' . endCol . 'c/'
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Alignment
# ---------
## Alignment
@RobertAudi
RobertAudi / cvimrc.vim
Last active August 29, 2015 14:01
cVim custom mappings (Vim for Chrome)
let barposition = "bottom"
set numerichints
set typelinkhints
unmap gt
unmap K
unmap gT
unmap J
unmap E
@RobertAudi
RobertAudi / TweetbotRSSmode.md
Created March 12, 2014 11:35
Mute tweets with no links in them in Tweetbot

Tweetbot RSS mode

^(.(?!(https?://|\.[a-z]{2,6})))*$