Skip to content

Instantly share code, notes, and snippets.

View egomesbrandao's full-sized avatar
🏠
Working from home

Emmanuel G. Brandão egomesbrandao

🏠
Working from home
View GitHub Profile
@lfcipriani
lfcipriani / gist:c35524da6d4712ce2c64
Created January 5, 2015 23:23
Sorteio Dojo Nodebr + Twitter
"use strict";
var path = require("path");
var fs = require("fs");
var Twit = require('twit');
var rateLimiter = {};
var luckyNumber = Math.round(Math.random()*60);
var re = /\d+/;
var oauth = JSON.parse(fs.readFileSync("./config/twitter_credentials.js", "UTF8"));
@juanplopes
juanplopes / gist:966611
Created May 11, 2011 14:58
BatchSelect
public static IEnumerable<IList<T>> BatchAggregate<T>(this IEnumerable<T> source, int batchSize)
{
var list = new List<T>(batchSize);
using (var enumerator = source.GetEnumerator())
{
while (enumerator.MoveNext())
{
list.Add(enumerator.Current);
if (list.Count == batchSize)
{
@igoravl
igoravl / TfsEventHandler.cs
Created August 6, 2011 00:33
Exemplo de event handler para o TFS
// Reference: Microsoft.TeamFoundation
// Reference: Microsoft.TeamFoudnation.Client
// Reference: Microsoft.TeamFoundation.Common
// Reference: Microsoft.TeamFoundation.Framework.Server
// Reference: Microsoft.TeamFoundation.Server
// Reference: Microsoft.TeamFoundation.WorkItemTracking.Client
// Reference: Microsoft.TeamFoundation.WorkItemTracking.Server.Dataaccesslayer
// Reference: Microsoft.TeamFoundation.WorkItemTracking.Server.DataServices
// Copy resulting DLL to %PROGRAMFILES%\Microsoft Team Foundation Server 2010\Application Tier\Web Services\Bin\Plugins
@vquaiato
vquaiato / clod.js
Created January 26, 2012 00:47
quanto tempo para vermos isso?
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end("Não tem que ser dificil!\n");
}).listen(1337, "127.0.0.1");
@diegocaxito
diegocaxito / CadastrarDinnerTeste.cs
Created February 11, 2012 23:26
Criando Testes de Interface em .Net com Selenium WebDriver para a aplicação NerdDinner
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium.IE;
@ldaniel
ldaniel / assunto.txt
Created March 21, 2012 16:52
Relação entre testes, design e métricas
Pessoal, gostaria de saber como vocês endereçam as questões que farei após explicar o cenário
abaixo. Pra mim, é muito claro que todas podem ser respondidas com um belo "depende", contudo,
vamos focar as respostas no que atenderia a maioria dos casos (lembrando que esse é um cenário
muito simplório).
-- CENÁRIO -----------------------------------------------------------------------------------------
Um desenvolvedor codificou inicialmente a classe (escrita em C#) no gist "exemplo_antes.cs".
Após aplicar um refactoring, ele chegou no resultado mostrado no gist "exemplo_depois.cs".
Algumas métricas foram coletadas antes e depois do refactoring (vide gist "métricas.txt").
@cassioeskelsen
cassioeskelsen / converter_itunes_library_para_mp3
Last active December 10, 2015 05:28
Conversão de biblioteca iTunes para MP3 com extração das tags e da cover art.
Eu estou colando aqui os comandos dados no processo, não criei nenhum bash script para isso pois
ia descobrindo aos poucos o que precisava ser feito.
Aplicações utilizadas no processo:
-Ubuntu Linux
-dependências: sudo apt-get install ffmpeg lame flac faac vorbis-tools python-mutagen mppenc subversion python-qt4 MP4v2-utils
-http://code.google.com/p/ftransc/ -> para conversão dos MP3. Pode-se utilizar o avconv também,
mas o ftransc converte o m4a e copia as tags (nome do artista,album,etc)
-m4av2 -> para extrair a cover art .(está no pacote MP4v2-utils instalado acima)
http://sist.sysu.edu.cn/~isslxm/DSA/textbook/Skiena.-.TheAlgorithmDesignManual.pdf
https://github.com/felipecruz/cdats
http://www.amazon.com/Algorithms-Unlocked-Thomas-H-Cormen/dp/0262518805/ref=sr_1_2?ie=UTF8&qid=1372518782&sr=8-2&keywords=cormen
http://www.amazon.com/Introduction-Algorithms-Thomas-H-Cormen/dp/0262033844/ref=sr_1_1?ie=UTF8&qid=1372518782&sr=8-1&keywords=cormen
https://sites.google.com/site/stevenhalim/
@klauswuestefeld
klauswuestefeld / gist:2883085
Created June 6, 2012 16:29
1985 - 2030 Mainstream Software Development Overview
We couldn’t find that file to show.
Key Function Description
--- -------- -----------
Enter AcceptLine Accept the input or move to the next line if input is missing a c...
Shift+Enter AddLine Move the cursor to the next line without attempting to execute th...
Ctrl+Enter InsertLineAbove Inserts a new empty line above the current line without attemptin...
Ctrl+Shift+Enter InsertLineBelow Inserts a new empty line below the current line without attemptin...
Escape RevertLine Equivalent to undo all edits (clears the line except lines import...
LeftArrow BackwardChar Move the cursor back one character
RightArrow ForwardChar Move the cursor forward one character