Skip to content

Instantly share code, notes, and snippets.

View blockloop's full-sized avatar

Brett Jones blockloop

  • Lithic (privacy.com)
View GitHub Profile
@blockloop
blockloop / style.css
Last active August 29, 2015 14:03
Bootstrap style table-hover for PureCSS
table.table-hover tr:hover td {
background: #e5e5e5;
}
@blockloop
blockloop / index.html
Last active August 29, 2015 14:03
PureCSS with Bootstrap 3's modal
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.5.0/pure-min.css">
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<a href="#myModal" role="button" class="pure-button-primary pure-button" data-toggle="modal">
@blockloop
blockloop / .vimrc
Created April 1, 2014 03:06
.vimrc
" vim: se ff=unix :
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Variables
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let $DBVIMRC = '~/Dropbox/configs/dotfiles/.vimrc'
let $DBGVIMRC = '~/Dropbox/configs/dotfiles/.gvimrc'
" Auto watch vimrc and reload it if it changes
augroup myvimrc
au!
#! /bin/sh
### BEGIN INIT INFO
# Provides: calibre
# Required-Start: network
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Controls the Calibre content server
# Description: Controls the Calibre content web server
#
@blockloop
blockloop / media-keys-basic.ahk
Last active December 25, 2015 05:39
Send media controls via shortcuts (play/pause, skip, back, volume up/down)
#SingleInstance force
RControl & UP::
Send {Volume_Up}
return
RControl & DOWN::
Send {Volume_Down}
return
@blockloop
blockloop / spotify-media-keys.ahk
Created October 1, 2013 21:21
Control Spotify with key combinations using autohotkey.
#SingleInstance force
SetTitleMatchMode 2
RControl & UP::
Send {Volume_Up}
return
RControl & DOWN::
Send {Volume_Down}
return
@blockloop
blockloop / rdio-media-keys.ahk
Created October 1, 2013 21:16
Control Rdio with key combinations using autohotkey. NOTE: this works with either the Rdio desktop app or a Chrome application shortcut but I've noticed that the Chrome shortcut works better and since the Rdio desktop application is basically just a Site-specific browser I just use Chrome.
#SingleInstance force
SetTitleMatchMode 2
RControl & UP::
Send {Volume_Up}
return
RControl & DOWN::
@blockloop
blockloop / Program.cs
Last active March 10, 2020 10:56
Ruby-ish *rescue* for C#. Swallowing exceptions in C# is almost always imprudent, but sometimes it's just necessary.
public T Rescue<T>(T defValue, Func<T> fn)
{
try
{
return fn();
}
catch
{
return defValue;
}
" Swig syntax
" Language: Swig
" Maintainer: Brett
" Last Change: Jul 6th, 2013
" Version: 0.1
" URL: https://github.com/brettof86/vim-swigjs
if version < 600
syntax clear
elseif exists("b:current_syntax")
@blockloop
blockloop / MyCtrl.js
Last active December 18, 2015 03:38
localStorage with angularjs and node webkit
myApp.controller('MyCtrl', ['$scope','storageService',
function($scope, storageService) {
var brain = storageService.getBrain();
$scope.items = [];
$.extend($scope, brain); // load from memory
$scope.addItem = function(item) {
$scope.items.push(item);
$scope.refresh();