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
/// Start Colors.Net | |
/// paste code to because the original libray is using NetStandard 2.0 | |
/// https://github.com/ahmelsayed/Colors.Net | |
public static class StringStaticMethods | |
{ | |
public static string Black(string value) | |
{ | |
var color = Data.ConsoleColorToUnicode[ConsoleColor.Black]; | |
return $"{color}{value}{color}"; | |
} |
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
// http://adventofcode.com/2017/day/1 | |
var input = "51629928149116951271942527619459642429126871269715586365184693792592845695881362442815621846833142385842261347196216575642383775685651975452498575976374755971125797736122835767829357269883975444475289883531339981574856251995832992791186165478421635548931999556629749983629598594389937361522337527123112891474527318449891524148839376167679991438526545998392374314655546517788649197996246591888839666423369324398396941268256179962878956929437455457567736821972414253678964912175858299134553763988885811376373851851118443985422338686876418913396454372194116978627478177565899132933175967994334221757853264351961529642439648766945145372811311474821717782687495346643543612916529537915722634578675689993574733678516174548793372152723939411872151719584918667681423288741317558732721414487689824857124851712179676624881736661433391515479698361217428123784616512911498845318884474511979864331485787152775783126529884683332786378134155938123845832278619237948745567156375712353425 |
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
// depends on BenchmarkDotNet 0.10.10 | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Attributes.Jobs; | |
using BenchmarkDotNet.Running; |
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
using System.Linq; | |
using ServiceStack; | |
using ServiceStack.Text; | |
public class GithubRepository | |
{ | |
public string Name { get; set; } | |
public string Description { get; set; } | |
public string Url { get; set; } | |
public string Homepage { get; set; } |
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
// candidate a producto | |
// get elemecodes from candidate | |
var canditateId = ""; | |
var elemCodes = [ "1", "2", "3"]; | |
// var candidates = monnog. | |
candidates.update( | |
{ _id: { $ne: canditateId }, elems: { code: { $in: elemCodes } } }, | |
{ $pull: { elems: { $elemMatch: { code: { $in: elemCodes } } } } } , | |
{ multi: true }, | |
function (err) { |
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
using System; | |
using Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.CodeAnalysis.CSharp.Syntax; | |
namespace Roslyn.CodeGeneration | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) |
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
{ | |
/* Prettier */ | |
// Fit code within this line limit | |
"prettier.printWidth": 80, | |
// Number of spaces it should use per tab | |
"prettier.tabWidth": 2, | |
// If true, will use single instead of double quotes | |
"prettier.singleQuote": true, | |
// Controls the printing of trailing commas wherever possible. Valid options: |
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
# creat a tag (more infos at: http://git-scm.com/book/de/ch2-12.html) | |
git tag -a 1.0.0 -m 'Version 1.0.0' | |
git push origin 1.0.0 | |
git tag -a 1.0.0.alpha1 -m 'Version 1.0.0 alpha1' | |
git push origin 1.0.0.alpha1 | |
# delete a tag | |
git tag -d 1.0.0 | |
git push origin :refs/tags/1.0.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
// library or otherwise | |
// { | |
type Func<T, TResult> = (value: T) => TResult; | |
type Predicate<T> = Func<T, boolean>; | |
function compose<TIn, TMiddle, TOut>(f: Func<TMiddle, TOut>, g: Func<TIn, TMiddle>) { | |
return (value: TIn) => f(g(value)); | |
} |
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
<div class='app-container'> | |
<span geo> | |
My love | |
</span> | |
</div> | |