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
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; | |
} |
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
npm ls -g -j --depth=0 | jq -r '.dependencies | keys | join(" ")' | xargs npm install -g |
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
#!/usr/bin/env bash | |
# Copyright (c) 2019 Ulysse Buonomo <buonomo.ulysse@gmail.com> (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 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
# On a Mac, use this script to generate secure deployment key | |
# To generate secure SSH deploy key for a github repo to be used from Travis | |
base64 --break=0 ~/.ssh/id_rsa_deploy > ~/.ssh/id_rsa_deploy_base64 | |
ENCRYPTION_FILTER="echo \$(echo \"- secure: \")\$(travis encrypt \"\$FILE='\`cat $FILE\`'\" -r floydpink/harimenon.com)" | |
# If you don't have homebrew please install it from http://brew.sh/ | |
brew install coreutils | |
gsplit --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_deploy_base64 id_rsa_ | |
# To reconstitute the private SSH key from within the Travis-CI build (typically from 'before_script') |
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
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 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 JSONKeyMinify = function (Array, JSON, undefined) { | |
"use strict"; | |
// http://stackoverflow.com/questions/1988349/array-push-if-does-not-exist | |
// http://stackoverflow.com/questions/4433402/replace-keys-json-in-javascript | |
Array.prototype.inArray = function (comparer) { | |
for (var i = 0; i < this.length; i++) { | |
if (comparer(this[i])) return true; | |
} | |
return false; | |
}; |
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
/** | |
* load-external-script-snippet.js | |
* Kosei Moriyama <cou929@gmail.com> | |
* | |
* 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 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
ഇംഗ്ലിഷിലെ 26 അക്ഷരങ്ങളും അടങ്ങുന്ന ഒരു വാക്യം ഇതാ: | |
THE QUICK BROWN FOX JUMPS OVER A LAZY DOG. | |
ഇത്തരത്തിലുള്ള വാക്യങ്ങൾ PANGRAM എന്ന പേരിലാണ് അറിയപ്പെടുന്നത്. | |
മലയാളത്തിൽ ആ വാക്യം -- | |
അജവും ആനയും ഐരാവതവും ഗരുഡനും കഠോരസ്വരം പൊഴിക്കെ ഹാരവും ഒഢ്യാണവും ഫാലത്തിൽ മഞ്ഞളും ഈറൻ കേശത്തിൽ ഔഷധ എണ്ണയുമായി ഋതുമതിയും അനഘയും ഭൂനാഥയുമായ ഉമ ദു:ഖഛവിയോടെ ഇടതു പാദം ഏന്തി ങ്യേയാദൃശം നിർഝരിയിലെ ചിറ്റലകളെ ഓമനിക്കുമ്പോൾ ബാലയുടെ കൺകളിൽ നീർഊർന്നു വിങ്ങി. | |
സംഭവം ഒരു ഒന്നന്നര സംഭവം തന്നെ കാരണം മലയാള അക്ഷരമാലയിലെ എല്ലാ അക്ഷരങ്ങളും ഈ വാക്യത്തിൽ ഉണ്ട്.😝😝😜k |
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 fonts = [{ | |
name: 'meera', | |
font: 'Meera' | |
}, { | |
name: 'rachana', | |
font: 'Rachana' | |
}, { | |
name: 'dyuthi', | |
font: 'Dyuthi' | |
}, { |
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
<!-- | |
__ __ _ _ _ _ _ _____ _ | |
\ \ / / | (_) | | | | (_) / ____| | | |
\ \ / /_ _| |_ __| | __ _| |_ _ ___ _ __ | | | |__ __ _ _ __ __ _ ___ ___ | |
\ \/ / _` | | |/ _` |/ _` | __| |/ _ \| '_ \ | | | '_ \ / _` | '_ \ / _` |/ _ \/ __| | |
\ / (_| | | | (_| | (_| | |_| | (_) | | | | | |____| | | | (_| | | | | (_| | __/\__ \ | |
\/ \__,_|_|_|\__,_|\__,_|\__|_|\___/|_| |_| \_____|_| |_|\__,_|_| |_|\__, |\___||___/ | |
__/ | | |
|___/ |
NewerOlder