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
// https://betterprogramming.pub/10-javascript-array-methods-to-boost-your-code-performance-acb57b455189 | |
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
## enumerate() inbuilt function lets you access index and value at the same time within a or loop | |
arr = [2,4,6,3,8,10] | |
for index,value in enumerate(arr): | |
print(f"At Index {index} The Value Is -> {value}") | |
'''Output | |
At Index 0 The Value Is -> 2 | |
At Index 1 The Value Is -> 4 | |
At Index 2 The Value Is -> 6 |
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 PORTAINER, CREATE NEW STACK USING WEB EDITOR AS BUILD METHOD AND PASTE THE FOLLOWING CODE, THEN DEPLOY | |
version: '2' | |
services: | |
db: | |
image: postgres:11-alpine | |
environment: | |
POSTGRES_DB: wiki | |
POSTGRES_PASSWORD: wikijsrocks | |
POSTGRES_USER: wikijs |
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
#Requires -RunAsAdministrator | |
<# | |
.SYNOPSIS | |
Creates a Self Signed Certificate for use in server to server authentication | |
.DESCRIPTION | |
.EXAMPLE | |
PS C:\> .\Create-SelfSignedCertificate.ps1 -CommonName "MyCert" -StartDate 2015-11-21 -EndDate 2017-11-21 | |
This will create a new self signed certificate with the common name "CN=MyCert". During creation you will be asked to provide a password to protect the private key. | |
.EXAMPLE | |
PS C:\> .\Create-SelfSignedCertificate.ps1 -CommonName "MyCert" -StartDate 2015-11-21 -EndDate 2017-11-21 -Password (ConvertTo-SecureString -String "MyPassword" -AsPlainText -Force) |
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
@ECHO ON | |
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 | |
@ECHO Done. |
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
/* font smoothing property. autoprefixer does not prefix at compile. */ | |
* { | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} | |
/* responsive web design media query */ | |
@media (min-width: 481px) and (max-width: 767px) { | |
//CSS |