Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
#fetch Gravatars
#http://code.google.com/p/gource/wiki/GravatarExample
use strict;
use warnings;
use LWP::Simple;
use Digest::MD5 qw(md5_hex);

Gource

Gource is a software version control visualization tool.

Software projects are displayed by Gource as an animated tree with the root directory of the project at its centre. Directories appear as branches with files as leaves. Developers can be seen working on the tree at the times they contributed to the project.

http://code.google.com/p/gource/

Installing Gource Manually (w/out MacPorts or Homebrew)

# Last Updated: 2014.06.05
# Gems to include
require 'Nokogiri'
require "open-uri"
require 'pp'
require 'json'
require 'csv'
# def get_default_data( default_stats, default_pricing, date_range )
@timelf123
timelf123 / keybase.md
Created July 23, 2014 02:16
keybase.md

Keybase proof

I hereby claim:

  • I am timelf123 on github.
  • I am timelf123 (https://keybase.io/timelf123) on keybase.
  • I have a public key whose fingerprint is B825 AB1A 5C53 9D4C B618 4C82 E8AC 15DE 804D 33F0

To claim this, I am signing this object:

@timelf123
timelf123 / gist:b88b4567486cbaaa0b99
Created September 24, 2014 19:31
Google Analytics Automatically Track Outbound Links
function _gaLt(event){
var el = event.srcElement || event.target;
/* Loop up the tree through parent elements if clicked element is not a link (eg: an image inside a link) */
while(el && (typeof el.tagName == 'undefined' || el.tagName.toLowerCase() != 'a' || !el.href))
el = el.parentNode;
if(el && el.href){
if(el.href.indexOf(location.host) == -1){ /* external link */
ga("send", "event", "Outgoing Links", el.href, document.location.pathname + document.location.search);
/************************************
* Store Account, Campaign, and AdGroup Level Quality Score
* Version 1.2
* ChangeLog v1.2
* - Changed status to ENABLED
* ChangeLog v1.1
* - Added APPEND option
* - Added ability to create spreadsheet sheets
* - Updated logic for faster spreadsheet insertion
* Created By: Russ Savage
@timelf123
timelf123 / enumerate_password_field_from_form.js
Last active August 29, 2015 14:12
In all forms found on page, find password fields and alert contents
(function(){
// number of forms
fl = document.forms.length;
for(var i = 0; i < fl; i++) {
tform = document.forms[i];
sfl = tform.length;
for(var j = 0; j < sfl; j++) {
// check if type attribute is set
if(typeof tform[j].type != "undefined") {
// if so check if type password
@timelf123
timelf123 / Guerilla Open Tube
Created January 5, 2015 20:58
Guerilla Open Tube
Copied from the FB post here: https://www.facebook.com/obvio171/posts/10153000167759469
Guerilla Open Tube in 8 Steps:
1. Install youtube-dl: http://rg3.github.io/youtube-dl/
2. Type this in the command line. It will download the video given by the URL: youtube-dl <video url>
3. Publish a torrent of the downloaded video file, be the first seeder, and grab the magnet link
4. Create a github repository called "guerilla-open-tube" with a "/video-ids" directory, like this one: https://github.com/obvio171/guerilla-open-tube
5. Add the video's magnet link as the first line in a text file named with the video's ID (the last part in the downloaded video's filename; a file ending in "-6GgbD7ZqIow.mp4" has an ID of 6GgbD7ZqIow, and would have as filename "6GgbD7ZqIow.txt", without the quotes) in the "/video-ids" directory (the other lines in the text file can be used for commentary or metadata—formats for this can emerge organically)
6. Find other repositories with the same name and merge in stuff from other people
7.
angular.module('campaign', [])
.factory('campaign', function ($log, $http, $q) {
var self = this;
this.campaigns = {};
// service logic
this.getCampaign = function (groupName, productName, campaignShort) {
self.apiEndPoint; // defined by env, ignore