Skip to content

Instantly share code, notes, and snippets.

View v2keener's full-sized avatar

Gustavo (Keener) DeLaFuerza v2keener

View GitHub Profile
<h1>This page is meant to redirect you to Gustavo Keener's new site,</h1>
<h1 style="padding-left: 25%;"><a href="http://www.keenerweb.com">KeenerWeb™</a></h1>
<h1>in <span id="number">8</span> seconds<span id="wait">...</span></h1>
<script type="text/javascript">
var span = document.getElementById('wait'), number = document.getElementById('number');
var waitStates = ['....', '..', '...'], first = true;
var count = 0, intervalSeconds = 0.5, maxSeconds = 8, intervalsPerSecond = (1 / intervalSeconds), maxCount = (maxSeconds * intervalsPerSecond);
var interval = window.setInterval(function () {
if (count >= maxCount) {
window.clearInterval(interval);
(function(){ // self-executing function
var id;
$('selectSomethingHere').hover(function () {
id = window.setTimeout("doTheSnapShotCrap();", 10000);
}, function () {
window.clearTimeout(id);
});
})();
@v2keener
v2keener / multiplication-game.js
Last active December 17, 2015 23:39
This is embeddable code for doing multiplication calculations
<div class="This-is-just-an-enclosure">
<div id='mathOut'> </div>
<div><input type='text' id='testasdf' /><input type='button' id='testbutton' value='Tell Me The Answer' /></div>
<div id="result"> </div>
<script type="text/javascript">
(function(){
var $ = jQuery;
var upperLimit = 13, lowerLimit = 1;
var math$ = $('#mathOut');
/* GIVEN: <div id='foo' /> such that out := $('#foo')
*/
/* Enclosed code block (anonymous namespace) for execution */
(function(){
/* Wait times for window.setTimeout in seconds */
var times = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.5,2.0];
/* This is so that we have a stopping point to avoid infinite recursion
@v2keener
v2keener / gist:6295117
Last active December 21, 2015 10:58
Expand All, Collapse All for TFS Web Portal
window.tfs_toggle = null;
(function(){
alert('initing toggle');
var expanded = false;
// Support TFS Web Portal Work Item query expand/collapse all functionality
var toggle = function(){
var collapse = function(){
$('.tswa-qrgminus').each(function(){ $(this).trigger("click"); });
},
expand = function(){
@v2keener
v2keener / radar.html
Created September 20, 2013 13:26
Radar.html with reload functionality
<html>
<!-- GLK:
This is taken directly from
https://github.com/bdargan/techradar
-->
<head id="headElement">
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
@v2keener
v2keener / tfs-open-work-items.ps1
Last active August 29, 2015 13:57
Viewing Open Work Items, TFS via PowerShell
<#
Taken from Julian Kay's Blog:
http://juliankay.com/development/querying-tfs-with-tfpt-exe-and-powershell/
#>
$TFSSERVER = "hq-tfs08-01.branded3.net"
@v2keener
v2keener / work-hours-from-tfs.ps1
Created March 4, 2014 14:10
Retrieve Work Hours from TFS with PowerShell
<#
Taken from Julian Kay's Blog
http://juliankay.com/development/querying-tfs-with-tfpt-exe-and-powershell/
#>
Function Get-WorkItemHours
{
$month = (Get-Date).ToString("MMMM")
@v2keener
v2keener / tampermonkey-basic-injection-w-jQuery.js.sublime-snippet
Last active April 1, 2016 08:26
Snippet: Base TamperMonkey injection script with jQuery via Google APIs
// ==UserScript==
// @name ${1:Some fancy name}
// @namespace ${2:https://gist.github.com/9665787}
// @version 0.1
// @description ${3:Some description}
// @match /* ALLOW TAMPERMONKEY TO FILL THIS IN *OR* COPY FROM TAMPERMONKEY */
// @copyright 2014+, ${4:Gustavo Keener}
// ==/UserScript==
// Add jQuery, unless it already exists
@v2keener
v2keener / .vimrc
Created April 10, 2014 16:19 — forked from JeffreyWay/.vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15