This file contains hidden or 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
az account list-locations -o table |
This file contains hidden or 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
code --list-extensions | |
code --install-extension ms-vscode.cpptools | |
code --uninstall-extension ms-vscode.csharp |
This file contains hidden or 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
drwxrwxrwx 1 pfrozi pfrozi 4096 Sep 2 17:57 . | |
drwxrwxrwx 1 pfrozi pfrozi 4096 Oct 2 2017 .. | |
-rwxrwxrwx 1 pfrozi pfrozi 624 Sep 2 17:58 .obsolete | |
drwxrwxrwx 1 pfrozi pfrozi 4096 Apr 12 2018 JohnyGeorges.jetjet-theme-1.0.0 | |
drwxrwxrwx 1 pfrozi pfrozi 4096 May 15 17:18 aaron-bond.better-comments-2.0.5 | |
drwxrwxrwx 1 pfrozi pfrozi 4096 Jan 29 2019 abusaidm.html-snippets-0.2.1 | |
drwxrwxrwx 1 pfrozi pfrozi 4096 Jun 27 2018 adamgirton.gloom-0.1.8 | |
drwxrwxrwx 1 pfrozi pfrozi 4096 Sep 2 13:44 ahmadawais.shades-of-purple-5.21.0 | |
drwxrwxrwx 1 pfrozi pfrozi 4096 Feb 12 2019 akamud.vscode-theme-onelight-2.1.0 | |
drwxrwxrwx 1 pfrozi pfrozi 4096 Aug 15 10:33 alefragnani.bookmarks-10.5.0 |
This file contains hidden or 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 | |
for p in $(ls); do cd $p && git fetch && git reset --hard && git clean -xfd && git checkout master && git pull origin master && cd ..; done |
This file contains hidden or 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 path = require('path'); | |
var fs = require('fs'); | |
var nodeModules = {}; | |
fs.readdirSync('node_modules') | |
.filter(function(x) { | |
return ['.bin'].indexOf(x) === -1; | |
}) | |
.forEach(function(mod) { | |
nodeModules[mod] = 'commonjs ' + mod; |
This file contains hidden or 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
private static object RandomString(int length) | |
{ | |
var random = new Random((int)DateTime.Now.Ticks); | |
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
return new string( | |
Enumerable.Repeat(chars, length) | |
.Select(s => s[random.Next(s.Length)] | |
).ToArray() | |
); | |
} |
This file contains hidden or 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
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
$ git push origin master | |
$ git remote rm bitbucket |
This file contains hidden or 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
public enum ServiceErrors | |
{ | |
[ErrorDescription(10, "A data de emissão é menor que a data de movimento.", ErrorType.DadosInvalidos)] | |
DataEmissaoMenorQueMovimento, | |
[ErrorDescription(20, "Data de emissão inválida.", ErrorType.DadosInvalidos)] | |
DataEmissaoInvalida | |
} | |
public static class ServiceErrorsExtension{ | |
public static ErrorDescriptionAttribute GetErrorDescription<T>(this T serviceErrors) | |
where T : struct, IConvertible, IComparable, IFormattable |
This file contains hidden or 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
doAnswer(new Answer() { | |
public Object answer(InvocationOnMock invocation) { | |
Object[] args = invocation.getArguments(); | |
((objectToAlter)args[0]).campo1 = 1; | |
((objectToAlter)args[0]).campo2 = 2; | |
return null; | |
}}) | |
.when(xxxx).method(entry()); |
This file contains hidden or 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
import com.jasongoodwin.monads.Try; | |
import org.apache.log4j.Logger; | |
import java.util.function.Function; | |
public abstract class Retrier<Tin, Tout> { | |
private static Logger logger = Logger.getLogger(WsExecuter.class); | |
private int LIMIT_OF_RETRIES; |