Skip to content

Instantly share code, notes, and snippets.

View lankaapura's full-sized avatar
👨‍💻
_

Priyantha Lankapura lankaapura

👨‍💻
_
View GitHub Profile
@lankaapura
lankaapura / evenmore.js
Last active July 13, 2016 09:02
generate random binary array and Inverse
var ar = getRandomArrayWithInverse(5);
console.log(ar.array);
console.log(ar.reverse);
function getRandomArrayWithInverse(size) {
var randomArray = [];
var inversedArray = [];
for (index = 0; index < size; index++) {
Import-Module -Name D:\Temp\ACME-posh\ACMEPowerShell.psd1
$domain = "mydomain.com"
$certificiatePassword = "abcd1234"
$email = "[email protected]"
$vault = "D:\Vault\{0}\{1}" -f $domain, [guid]::NewGuid()
mkdir $vault
cd $vault
Initialize-ACMEVault -BaseURI https://acme-v01.api.letsencrypt.org/
New-ACMERegistration -Contacts mailto:$email
@lankaapura
lankaapura / Samples.JS
Created March 11, 2016 09:11
JQuery 3 Samples
////// 1.1 FOR...OF LOOP
// let’s say that you want to assign an ID to each input element of a page
//OLD
var $inputs = $('input');
for (var i = 0; i < $inputs.length; i++) {
$inputs[i].id = 'input-' + i;
}