Skip to content

Instantly share code, notes, and snippets.

Nirmal Lanka nirlanka

  • Embla Software Innovation
  • Chilaw/Mount-Lavinia/Peradeniya, Sri Lanka
Block or report user

Report or block nirlanka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nirlanka / minimal-test.cs
Last active Nov 16, 2019
SublimeText3 CSharp runner and builder for Linux and OS X using installed Mono development environment
View minimal-test.cs
using System;
class Test
static void Main()
Console.WriteLine("Hello Sublime");
nirlanka / html-structure.html
Created Oct 17, 2019
Add this style to any web page's header through dev-tools to see the structure of the layout.
View html-structure.html
<style>body * { background-color: rgba(0,0,100, .2) !important; outline: rgba(0,100,0, .2) !important; }</style>
nirlanka / lisp-like.js
Last active Sep 14, 2019
A simple lisp-like language/interpreter written in pure javascript, using javascript arrays, without any dependencies. UPDATE: I'll be continuing work on this repository:
View lisp-like.js
(function () {
const __inp = `
((defun foo (a b)
(* a b))
(print (foo 2 3))
(defun bar (a b c) (foo
(foo a b)
(print (bar 4 5 6))
nirlanka /
Created Aug 7, 2019
Answer to Hackerrank challenge "Password Cracker", which is correct, but not the expected answer in some test cases ¯\_(ツ)_/¯ (
DEBUG = False
import math
import os
import random
import re
import sys
DEBUG = False
import os
import sys
def trie_find(node, path):
if not node.get(path[0]):
return 0
nirlanka /
Last active Jul 25, 2019
Create quick light Angular project
ng new $appname --prefix=$appname --enableIvy=true --inlineStyle=true --inlineTemplate=true --skipTests=true --routing=true --skipInstall=true --style=sass
nirlanka / install-apps.ps1
Last active Jul 13, 2019
Install dev-env for MicroBuild
View install-apps.ps1
# Install Chrome
choco install googlechrome -y
# Install Slack
choco install slack -y
# Install other packages
choco install nvm -y
# Install NodeJS
nirlanka /
Created Jul 5, 2019
Extract package details from .NET or NodeJS projects
## Usage:
## python(3) .\ filename.ext::filename2.ext
import sys
import subprocess
import json
import requests
def log(txt, line_end='\n'):
outfile = open('extract-packages.log.txt', 'a')
nirlanka / click-to-copy-cell.js
Created May 13, 2019
Click to copy text (from table cell) in HTML with pure Javascript
View click-to-copy-cell.js
const copyToClipboard = str => {
const el = document.createElement('textarea');
el.value = str;
document.addEventListener('click', (e) => {
nirlanka / mobileconfig.json
Created Apr 9, 2019
MicroBuild Management Mobile - test 1
View mobileconfig.json
"//0.0.1": "http://localhost:59659/",
"0.0.1": ""
You can’t perform that action at this time.