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
| # 1. Open %USERPROFILE%/Documents | |
| # 2. Create a folder called "WindowsPowerShell" | |
| # 3. Drop this file inside this folder | |
| # 4. Open a new PowerShell with Admin Privileges | |
| # 5. Run this script to allow unsigned scripts: Set-ExecutionPolicy Unrestricted | |
| function prompt { | |
| $location = (Get-Location).ToString() | |
| $location = $location.Replace($env:USERPROFILE, "~") |
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
| [alias] | |
| # stash; checkout; pop | |
| # git scp -> | |
| # git stash; git checkout -; git stash pop; | |
| scp = !git stash && git checkout - && git stash pop | |
| # stash; checkout specific; pop | |
| # git scsp myBrach -> | |
| # git stash; git checkout myBranch; git stash pop; | |
| scsp = !git stash && git checkout $1 && git stash pop && : |
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
| const success = (value) => { | |
| console.log(`Promise succeeded with ${value}`); | |
| } | |
| const error = (err) => { | |
| console.error(`Promise failed with ${err}`); | |
| } |
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
| # python 3.6+ | |
| import pandas as pd | |
| from pyodbc import connect as connect_to_db | |
| # database variables | |
| sql_server = 'test' | |
| database = 'test' | |
| username = 'user' | |
| password = 'password' |
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
| function removeFalsyValues(values) { | |
| return values.filter(value => Boolean(value)); | |
| } | |
| function showValues(values) { | |
| values.forEach(value => console.log(`Got value: ${value}`)); | |
| } | |
| function greaterThanZero(values) { | |
| return values.filter(value => value > 0); |