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
| /** | |
| * load-external-script-snippet.js | |
| * Kosei Moriyama <[email protected]> | |
| * | |
| * Simple code snippet for loading external script from a bookmarklet. | |
| * Replace example url of script to your target script url before use. | |
| */ | |
| (function() { | |
| var u = 'http://example.com/bookmarklet.js'; |
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.Collections.Generic; | |
| using Microsoft.AspNetCore.Builder; | |
| using Microsoft.AspNetCore.Hosting; | |
| // reference: https://andrewlock.net/adding-validation-to-strongly-typed-configuration-objects-in-asp-net-core/#creating-a-settings-validation-step-with-an-istartupfilter | |
| namespace MyWeb.Filters | |
| { | |
| public class ConfigValidationStartupFilter : IStartupFilter | |
| { |
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
| #!/usr/bin/env bash | |
| # Copyright (c) 2019 Ulysse Buonomo <[email protected]> (MIT license) | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: | |
| # |
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
| npm ls -g -j --depth=0 | jq -r '.dependencies | keys | join(" ")' | xargs npm install -g |
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
| const numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; | |
| const isPrime = (num: number) => { | |
| const sqRoot = Math.floor(Math.sqrt(num)); | |
| let prime = num != 1; | |
| for (let i = 2; i < sqRoot + 1; i++) { | |
| if (num % i == 0) { | |
| prime = false; | |
| break; | |
| } |
OlderNewer