Skip to content

Instantly share code, notes, and snippets.

View tvilo's full-sized avatar

Tyler Vilo tvilo

  • Verma Systems
  • Baton Rouge, LA
View GitHub Profile
@tvilo
tvilo / javascript-snippets.js
Last active March 18, 2025 06:08
js snippets to improve code performance
// https://betterprogramming.pub/10-javascript-array-methods-to-boost-your-code-performance-acb57b455189
## 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
# 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
#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)
@tvilo
tvilo / TokenFilterPolicy.bat
Last active April 14, 2021 01:22
batch files .bat
@ECHO ON
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1
@ECHO Done.
@tvilo
tvilo / blog.md
Last active April 13, 2021 17:40
log-test.log

Test Log

Heading 2

Heading 3

Heading 4

@tvilo
tvilo / css snippets.css
Last active April 13, 2021 17:30
css snippets
/* 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