Skip to content

Instantly share code, notes, and snippets.

Avatar
💙
Always deliver more than expected.

Luiz Freneda lfreneda

💙
Always deliver more than expected.
View GitHub Profile
@lfreneda
lfreneda / elasticsearch_index
Created Aug 27, 2015
elasticsearch playground with people index
View elasticsearch_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 Aug 27, 2015
elasticsearch_index_people
View 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 Aug 29, 2015
Nuget pack post build
View 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 Aug 29, 2015
Git - O que devo fazer? ~ Level Up! Games
View git_guide_what_should_I_do
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 Aug 29, 2015
s3 with deflate or gzip =)
View s3_put_get_deflate_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))
View software_frases_<3
As a programmer I want to write a poem and hope that it will become software
@lfreneda
lfreneda / gist:160cedd1c50ec02926cb
Last active Aug 29, 2015
AssertConversion multiples assert but with right feedback :P
View gist:160cedd1c50ec02926cb
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;
View gist:a4a724d455e532809ae0
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 Aug 31, 2015
index_people_with_routing
View gist:74bfc68439144899d256
# 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 Sep 9, 2015 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu
View 00.howto_install_phantomjs.md

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
You can’t perform that action at this time.