Skip to content

Instantly share code, notes, and snippets.

View dialtone's full-sized avatar

Valentino Volonghi dialtone

View GitHub Profile
var _payloadArgs = null;
function installMonitor(){
var rootElement = document.body || document.head || document.documentElement;
// Create communications dom elem
var div = $('<div/>').attr({"id": "unique"}).css({display: "none"});
div.appendTo(mainElement);
// this is our click handler that the injected js will call.
Generating... Liquid Exception: private method `sub' called for nil:NilClass in 2013-07-09-whatever.md
/Library/Ruby/Gems/1.8/gems/jekyll-1.0.3/bin/../lib/jekyll/tags/highlight.rb:77:in `add_code_tags': private method `sub' called for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/jekyll-1.0.3/bin/../lib/jekyll/tags/highlight.rb:57:in `render_pygments'
from /Library/Ruby/Gems/1.8/gems/jekyll-1.0.3/bin/../lib/jekyll/tags/highlight.rb:45:in `render'
from /Library/Ruby/Gems/1.8/gems/liquid-2.5.0/lib/liquid/block.rb:106:in `render_all'
from /Library/Ruby/Gems/1.8/gems/liquid-2.5.0/lib/liquid/block.rb:93:in `each'
from /Library/Ruby/Gems/1.8/gems/liquid-2.5.0/lib/liquid/block.rb:93:in `render_all'
from /Library/Ruby/Gems/1.8/gems/liquid-2.5.0/lib/liquid/block.rb:82:in `render'
from /Library/Ruby/Gems/1.8/gems/liquid-2.5.0/lib/liquid/template.rb:124:in `render'
from /Library/Ruby/Gems/1.8/gems/liquid-2.5.0/lib/liquid/template.rb:132:in `render!'
(function () {
var _onload = function(){
if (document.readyState && !/loaded|complete/.test(document.readyState)){setTimeout(_onload, 10);return}
if (!window.__adroll_loaded){__adroll_loaded=true;setTimeout(_onload, 50);return}
var scr = document.createElement("script");
var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com");
scr.setAttribute('async', 'true');
scr.type = "text/javascript";
scr.src = host + "/j/roundtrip.js";
((document.getElementsByTagName('head') || [null])[0] ||
Vim
UpdateList0 = [{update, [
{<<"AdGroupId">>, [{value, [{<<"S">>, AdGroupId}]},
{action, put}]},
{<<"AdId">>, [{value, [{<<"S">>, AdId}]},
{action, put}]},
{<<"Kind">>, [{value, [{<<"S">>, ?IMP}]},
{action, put}]},
{<<"Updated">>, [{value, [{<<"S">>,
@dialtone
dialtone / vimrc.vim
Created January 24, 2012 21:46
My .vimrc file
set nocompatible " choose no compatibility with legacy vi
syntax enable
set encoding=utf-8
set showcmd " display incomplete commands
filetype plugin indent on " load file type plugins + indentation
"" Whitespace
set nowrap " don't wrap lines
set tabstop=4
set shiftwidth=4 " a tab is two spaces (or set this to 4)
@dialtone
dialtone / projectRoot.vim
Created January 24, 2012 06:49
Find root of a project given some markers
function! s:findroot(curr, markers, depth)
" Search all markers in the current directory
for marker in a:markers
let found = !empty(globpath(a:curr, marker))
if !found && a:depth > 40
return ''
endif
if found
return a:curr
endif
putitem(Key, AdGroupId, AdId, ?IMP, TTL, Now) ->
dinerl:put_item(<<"Attributions">>, [{<<"UserKey">>, [{<<"S">>, Key}]},
{<<"Updated">>, [{<<"N">>, list_to_binary(integer_to_list(Now))}]},
{<<"TTL">>, [{<<"N">>, list_to_binary(integer_to_list(TTL))}]},
{<<"AdGroupId">>, [{<<"S">>, AdGroupId}]}, {<<"AdId">>, [{<<"S">>,
AdId}]}, {<<"Kind">>, [{<<"S">>, ?IMP}]}], []).
<!DOCTYPE html>
<!--
* Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this
* source code is governed by a BSD-style license that can be found in the
* LICENSE file.
-->
<html>
<head>
</head>
<body>
@dialtone
dialtone / gist:1366277
Created November 15, 2011 05:47
Loop fprof result
Processing data...
Creating output...
%% Analysis results:
{ analysis_options,
[{callers, true},
{sort, acc},
{totals, false},
{details, true}]}.
% CNT ACC OWN
@dialtone
dialtone / pivotal_to_github.py
Created September 23, 2011 00:48
Migrate from Pivotal Tracker to GitHub issues
import re
import sys
import csv
import json
import urllib2
from datetime import datetime
from collections import defaultdict as dd