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 / Request com GET
Last active August 29, 2015 13:55
WCF com REST e Authorization
GET http://localhost:41009/Service1.svc/1 HTTP 1.1
Accept: application/json
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/json
@giggio
giggio / MainWindow.xaml
Created February 26, 2014 14:39
Exemplo de código assíncrono com async e await no C#
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Button Content="Button" HorizontalAlignment="Left" Margin="155,60,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
<Label x:Name="lbl" Content="Label" HorizontalAlignment="Left" Margin="156,108,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="txt" HorizontalAlignment="Left" Height="23" Margin="156,31,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="120"/>
</Grid>
msgwait 0
@giggio
giggio / terminatorConfig
Created April 12, 2014 23:31
My terminator configuration
#terminator config, located at ~/.config/terminator/config
[global_config]
suppress_multiple_term_dialog = True
window_state = "fullscreen"
[keybindings]
[profiles]
[[default]]
background_image = None
background_color = '#300a24'
background_type = 'transparent'
set editing-mode vi
set bell-style none
set show-all-if-ambiguous on
set completion-ignore-case on
# on menu-complete, first display the common prefix, then cycle through the options when hitting TAB
set menu-complete-display-prefix on
set keymap vi-command
"gg": beginning-of-history
@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 / 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
{