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 no = [ | |
| 'Østfold', | |
| 'Akershus', | |
| 'Oslo', | |
| 'Hedmark', | |
| 'Oppland', | |
| 'Buskerud', | |
| 'Vestfold', | |
| 'Telemark', | |
| 'Aust-Agder', |
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
| # Nginx proxy for Elasticsearch + Kibana | |
| # If you use this, you'll want to point config.js at http://FQDN:80/ instead of | |
| # http://FQDN:9200 | |
| server { | |
| listen *:80 ; | |
| server_name kibana.myhost.org; | |
| access_log /var/log/nginx/kibana.myhost.org.access.log; | |
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
| git branch --merged | grep -v "\*" | xargs -n 1 git branch -d |
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 class TokenService | |
| { | |
| public static IEnumerable<Claim> ValidateAndParseToClaims(string token, string validAudience) | |
| { | |
| var parameters = CreateTokenValidationParameters(validAudience); | |
| SecurityToken jwt; | |
| var principal = new JwtSecurityTokenHandler().ValidateToken(token, parameters, out jwt); | |
| return principal.Claims; |
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
| [alias] | |
| # common aliases - acquired from many places... | |
| # operations | |
| b = branch | |
| cl = clone | |
| ci = commit | |
| amend = commit --amend --no-edit | |
| st = status --short --branch |
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
| class Program | |
| { | |
| static void Main() | |
| { | |
| Console.WriteLine("Default Math.Round(x)"); | |
| Console.WriteLine(Round(1.5)); | |
| Console.WriteLine(Round(2.5)); | |
| Console.WriteLine(Round(3.5)); | |
| } |
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 System.Globalization; | |
| namespace MathRound.Demo | |
| { | |
| class Program | |
| { | |
| static void Main() | |
| { | |
| Console.WriteLine("Math.Round(x, MidpointRounding.AwayFromZero)"); |
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 System.Linq; | |
| namespace MathRandom | |
| { | |
| class Program | |
| { | |
| static void Main() | |
| { | |
| var random1 = new Random(); |
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 System.Linq; | |
| using System.Threading; | |
| namespace MathRandom | |
| { | |
| class Program | |
| { | |
| static void Main() | |
| { |
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 System.Linq; | |
| using System.Threading; | |
| namespace MathRandom | |
| { | |
| class Program | |
| { | |
| static void Main() | |
| { |
OlderNewer