This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ReSharper disable CheckNamespace | |
namespace RestSharp.Deserializers | |
// ReSharper restore CheckNamespace | |
{ | |
public class DynamicJsonDeserializer : IDeserializer | |
{ | |
public string RootElement { get; set; } | |
public string Namespace { get; set; } | |
public string DateFormat { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var file = Request.Files[0]; | |
if (file.ContentLength > 0) | |
{ | |
Amazon.S3.AmazonS3Client client; | |
using (client = new AmazonS3Client(new AmazonS3Config() { ServiceURL = "http://s3.amazonaws.com" })) | |
{ | |
PutObjectRequest request = new PutObjectRequest(); | |
request.BucketName = "bucketname"; | |
request.CannedACL = S3CannedACL.PublicRead; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[diff] | |
tool = vsdiffmerge | |
[difftool] | |
prompt = false | |
keepBackup = false | |
[difftool "vsdiffmerge"] | |
cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$LOCAL\" \"$REMOTE\" //t | |
trustexistcode = true | |
[merge] | |
tool = vsdiffmerge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
"C:\Program Files\Sublime Text 3\sublime_text.exe" $1 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while : | |
do | |
clear | |
if [ "$1" == "" ]; then | |
git --no-pager log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
else | |
git --no-pager log -$1 --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Algumas funcões utilitarias | |
//Os exemplos funcionarão se o underscore.js estiver presente na página =D | |
//TIMES - Executa n vezes o que estiver contido no bloco de callback | |
_.times(2, function(n){ | |
console.log(n + ' bla bla'); // indice começa em zero | |
}); | |
//>> 0 bla bla | |
//>> 1 bla bla |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Algumas funcões para trabalhar com objetos | |
//Os exemplos funcionarão se o underscore.js estiver presente na página =D | |
//Configurado um objeto pessoa para os exemplos | |
var pessoas = {Nome: 'Cleber', Idade: 26} | |
//KEYS - Retorna só as keys de um objeto | |
var keys = _.keys(pessoas); | |
console.log(keys); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Algumas funcões para trabalhar com Arrays | |
//Os exemplos funcionarão se o underscore.js estiver presente na página =D | |
//Configurado uma lista de números para os exemplos | |
var numeros = [4, 1, 7, 2, 10, 2]; | |
//Range - Cria uma lista numérica | |
var range = _.range(10); //índice começando em zero | |
console.log(range); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Algumas funcões para trabalhar com coleções | |
//Os exemplos funcionarão se o underscore.js estiver presente na página =D | |
//Configurado duas listas para os exemplos | |
var numeros = [4, 1, 7, 2, 10]; | |
var pessoas = [{Nome: 'Cleber', Idade: 26}, {Nome: 'Alex', Idade: 16}, {Nome: 'Augusto', Idade: 30}]; | |
//MAX - Retorna o valor máximo - Tipo no SQL | |
var maiorNumero = _.max(numeros); |