Skip to content

Instantly share code, notes, and snippets.

View BrunoCaimar's full-sized avatar

Bruno Caimar BrunoCaimar

View GitHub Profile
@BrunoCaimar
BrunoCaimar / tfdThesaurus.ubiquity.js
Created September 18, 2009 22:46
TFD Thesaurus ubiquity command
CmdUtils.CreateCommand({
names: ["thesaurus", "tfdThesaurus"],
icon: "http://img.tfd.com/favicon.ico",
description: "Looks for synonyms on TFD (The Free Dictionary)",
help: "Looks for synonyms on TFD (The Free Dictionary)" + "Developed by Bruno Caimar - Version 0.1.0_20090918",
author: {
name: "Bruno Caimar",
email: "[email protected]"
},
license: "MIT",
var imgs = $('#div_memethis_overlay img');
imgs.each ( function(i, img) {
if (img.src !== 'http://memethis.com/img/overlay_logo.png') {
$(img).mouseover(function(f) {
console.log('mouseover', $(f.target).width(), $(f.target).height());
$(f.target).width($(f.target).width() *4);
$(f.target).height($(f.target).height() *4);
}
);
$(img).mouseout(function(f) {
@BrunoCaimar
BrunoCaimar / MemeThisLoad.js
Created November 13, 2009 00:32
MeMeThisLoad.js
//
// load.js
// Loads jQuery and the form-building script
//
// First and foremost, JQuery to the rescue
var memeThisJQueryScript = document.createElement('script');
memeThisJQueryScript.setAttribute('language', 'javascript');
memeThisJQueryScript.setAttribute('type', 'text/javascript');
memeThisJQueryScript.setAttribute('src', 'http://memethis.com/js/jquery-1.3.2.min.js');
document.getElementsByTagName('head')[0].appendChild(memeThisJQueryScript);
@BrunoCaimar
BrunoCaimar / MeMeThisBuildForm.js
Created November 13, 2009 00:32
MeMeThisBuildForm.js
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* SHA-1 implementation in JavaScript (c) Chris Veness 2002-2009 */
/* http://www.movable-type.co.uk/scripts/sha1.html */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function sha1Hash(k){var o=[1518500249,1859775393,2400959708,3395469782];k+=String.fromCharCode(128);var y=k.length/4+2;var m=Math.ceil(y/16);var n=new Array(m);for(var A=0;A<m;A++){n[A]=new Array(16);for(var z=0;z<16;z++){n[A][z]=(k.charCodeAt(A*64+z*4)<<24)|(k.charCodeAt(A*64+z*4+1)<<16)|(k.charCodeAt(A*64+z*4+2)<<8)|(k.charCodeAt(A*64+z*4+3))}}n[m-1][14]=((k.length-1)*8)/Math.pow(2,32);n[m-1][14]=Math.floor(n[m-1][14]);n[m-1][15]=((k.length-1)*8)&4294967295;var v=1732584193;var u=4023233417;var r=2562383102;var q=271733878;var p=3285377520;var g=new Array(80);var F,E,D,C,B;for(var A=0;A<m;A++){for(var w=0;w<16
@BrunoCaimar
BrunoCaimar / jetmeme.js
Created December 2, 2009 22:58
JetMeme.js
// @name JetMeme
// @author Bruno Caimar <bruno.caimarATgmail.com/>
// http://twitter.com/brunocaimar
// http://meme.yahoo.com/brunocaimar
//
// @description Add a context menu on images to post it to Yahoo! Meme
//
// @license http://www.opensource.org/licenses/bsd-license.php
// @version 0.0.1b_20091201 - Initial development
// @name JetMeme
//
// @author Bruno Caimar <bruno.caimarATgmail.com/>
// http://twitter.com/brunocaimar
// http://meme.yahoo.com/brunocaimar
//
// @description (en-US) Add a context menu on images and selection to post it to Yahoo! Meme
// Menu item will open a new tab to post the selected content to Yahoo! Meme
//
// (pt-BR) Adiciona um menu de contexto em imagens e seleções para facilitar a
static void Main(string[] args)
{
int[] oneToNine = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
var query =
from i1 in oneToNine
from i2 in oneToNine
from i3 in oneToNine
select i1 + (10 * i2) + (100 * i3) ;
Private Sub InsertTabClasse(ByVal instance As TabClasse)
Dim novoCodigo = If(Me.TabClasse.Count > 0,
Me.GetCodigoSemClientID(Me.TabClasse.Max(Function(f) f.CodClasse), TamanhoChave.TresDecimais),
1)
instance.CodClasse = novoCodigo
Me.ExecuteDynamicInsert(instance)
End Sub
@BrunoCaimar
BrunoCaimar / UninstallGcx.ps1
Created December 30, 2010 12:11
Uninstall Gisconnex
#$a = "Gisconnex WM 1.0.2", "Gisconnex PD 1.0.11", "Gisconnex ADM 1.0.11"
$a = "Gisconnex WM 2.0.0", "Gisconnex PD 2.0.0", "Gisconnex ADM 2.0.0"
# Read-Host Para ler do prompt
# Write-Host Para escrever no prompt
$Keys = Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall
$Items = $keys |foreach-object {Get-ItemProperty $_.PsPath}
@BrunoCaimar
BrunoCaimar / gist:1065412
Created July 5, 2011 17:53
Agile Leadership and transition
Team leadership in the age of Agile - Roy Osherove
http://www.slideshare.net/royosherove/team-leadership-in-the-age-of-agile-roy-osherove
Roy Blog about Leadership
http://5whys.com/
Thoughtworks - Agile Transitions Community
http://community.thoughtworks.com/groups/15fa8f3de2/summary
Agile Transitions - Mike Cohn