Skip to content

Instantly share code, notes, and snippets.

View lfreneda's full-sized avatar
💙
Always deliver more than expected.

Luiz Freneda lfreneda

💙
Always deliver more than expected.
View GitHub Profile
@lfreneda
lfreneda / elasticsearch_index
Created August 27, 2015 18:25
elasticsearch playground with people index
# Delete the `my_index` index
DELETE /people
# Map the `postcode` to be not_analyzed
PUT /people
{
"settings": {
"analysis": {
"filter": {
"brazilian_stop": {
@lfreneda
lfreneda / index_people
Last active August 27, 2015 19:58
elasticsearch_index_people
# Delete the `people` index
DELETE /people
# Create the `people` index with proper settings
PUT /people
{
"settings": {
"analysis": {
"filter": {
"brazilian_stop": {
@lfreneda
lfreneda / nuget_pack_post_build
Last active August 29, 2015 14:02
Nuget pack post build
copy "$(TargetPath)" "$(ProjectDir)nuget-package\lib\net40\"
"$(SolutionDir)nuget\NuGet.exe" pack "$(ProjectDir)nuget-package\Automovel.Corretor.nuspec" -OutputDirectory "$(ProjectDir)nuget-package"
copy "$(ProjectDir)nuget-package\*.nupkg" "\\DC-000-043\wwwroot\nugetserver\Packages\"
copy "$(TargetPath)" "$(ProjectDir)..\nuget-package\lib\net40\"
"$(SolutionDir).nuget\NuGet.exe" pack $(ProjectPath)
copy "$(TargetDir)\*.nupkg" "\\sp-iis01t\nuget\integracoes\packages"
if $(ConfigurationName) == Release (
echo "Publicando nuget package com contrato automovel corretor"
@lfreneda
lfreneda / git_guide_what_should_I_do
Last active August 29, 2015 14:02
Git - O que devo fazer? ~ Level Up! Games
1. Criando um repositório remoto
O Git possui várias formas de se comunicar, protocolos, com os repositórios. Estamos usando o chamado [wiki:git_protocolo_local Protocolo Local].
Para criar um repositório remoto precisamos seguir os seguintes passos:
A. Abra o Bash do Git
B. Navegue até o local de criação
cd /x
cd dotnet
@lfreneda
lfreneda / s3_put_get_deflate_gzip
Last active August 29, 2015 14:03
s3 with deflate or gzip =)
//install-package AWSSDK
class Program
{
private static IAmazonS3 _client;
private static byte[] DeflateCompress(Stream input)
{
using (var compressStream = new MemoryStream())
using (var compressor = new DeflateStream(compressStream, CompressionMode.Compress))
@lfreneda
lfreneda / software_frases_<3
Created September 25, 2014 17:27
software frases
As a programmer I want to write a poem and hope that it will become software
@lfreneda
lfreneda / gist:160cedd1c50ec02926cb
Last active August 29, 2015 14:11
AssertConversion multiples assert but with right feedback :P
public class AssertProperties<T>
{
private readonly ICollection<string> _errors = new List<string>();
public class AssertValue<TResult>
{
private readonly object _value;
private readonly string _propertName;
private readonly AssertProperties<T> _parent;
@lfreneda
lfreneda / gist:a4a724d455e532809ae0
Last active August 29, 2015 14:11 — forked from wildbrain72/gist:7afc91742858e29e9836
AssertProperties.cs
public class AssertProperties<T>
{
private readonly ICollection<string> _errors = new List<string>();
public class AssertValue<TResult>
{
private readonly object _value;
private readonly string _propertName;
private readonly AssertProperties<T> _parent;
@lfreneda
lfreneda / gist:74bfc68439144899d256
Last active August 31, 2015 14:03
index_people_with_routing
# Delete the `people` index
DELETE /people
# Create the `people` index with proper settings
PUT /people
{
"settings": {
"analysis": {
"filter": {
"brazilian_stop": {
@lfreneda
lfreneda / 00.howto_install_phantomjs.md
Last active September 9, 2015 01:05 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev