Skip to content

Instantly share code, notes, and snippets.

View giggio's full-sized avatar
💭
Nada a perder.

Giovanni Bassi giggio

💭
Nada a perder.
View GitHub Profile
@giggio
giggio / dontreturn.coffee
Created August 4, 2011 15:49
CoffeeScript, don't return!
$('#teste').click ->
alert "Hello CoffeeScript!"
return
# turns into:
#
# (function() {
# $('#teste').click(function() {
# alert("Hello CoffeeScript!");
# });
@giggio
giggio / AutomoqTest.cs
Created October 19, 2011 14:06
AutoMoq problem when calling twice in a very specific scenario
using AutoMoq;
using NUnit.Framework;
namespace TestProject1
{
[TestFixture]
public class UnitTest1
{
readonly AutoMoqer mocker = new AutoMoqer();
private SomeController controller;
@giggio
giggio / .hgignore
Created January 12, 2012 02:52
very common hg ignore
# Ignore file for Visual Studio 2010
# use glob syntax
syntax: glob
*.obj
*.pdb
*.user
*.aps
@giggio
giggio / .bashrc
Last active February 4, 2020 15:46
sample bashrc
#!/usr/bin/env bash
# Path to the bash it configuration
export BASH_IT="/home/giggio/.bash_it"
# Lock and Load a custom theme file
# location /.bash_it/themes/
export BASH_IT_THEME='powerline-multiline'
# (Advanced): Change this to the name of your remote repo if you
@giggio
giggio / BindingEstaticoDinamico.cs
Created February 16, 2012 01:14
Exemplo de binding estático e dinâmico em C#
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TestProject3
{
[TestClass]
public class BindingTest
{
[TestMethod]
public void EstaticoString()
{
@giggio
giggio / WageTest.cs
Created April 11, 2012 14:29 — forked from ldaniel/assunto.txt
Relação entre testes, design e métricas
using FluentAssertions;
using NUnit.Framework;
using CleanCode.After.After;
namespace Metricas
{
[TestFixture]
public class WageTest
{
@giggio
giggio / ForeachTest.cs
Created April 22, 2012 15:49
Iterating over a dynamic list
using System.Collections;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace DynamicForeach
{
[TestClass]
public class ForeachTest
{
[TestMethod]
public void ForeachDynamicTest()
@giggio
giggio / teste.html
Created December 12, 2012 20:46
Teste de desempenho criado pelo Rogério Moraes de Carvalho
<!DOCTYPE html>
<html>
<head>
<title>Teste de processamento JavaScript</title>
<script type="text/javascript">
var somas = [];
var temposGastos = [];
var quantidadeCalculos = 3; // Quantidade de vezes que a soma será executada.
var quantidadeIteracoes = 10000000;
<html>
<head>
<style type="text/css">
.fonte {
font-family: "Eras ITC", "Eras Medium ITC", Arial, sans-serif;
font-size: 96px;
}
</style>
</head>
<body>