mode con:cols=150 lines=50
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Undefined
Get-Command # Retrieves a list of all the commands available to PowerShell | |
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules) | |
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft* | |
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item" | |
Get-Help # Get all help topics | |
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page) | |
Get-Help -Name Get-Command # Get help for a specific PowerShell function | |
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command |
<# | |
.Synopsis | |
Exports environment variable from the .env file to the current process. | |
.Description | |
This function looks for .env file in the current directoty, if present | |
it loads the environment variable mentioned in the file to the current process. | |
based on https://github.com/rajivharris/Set-PsEnv |
// groupcities.js | |
// An alternative solution to: | |
// https://dev.to/albinotonnina/how-to-lose-a-it-job-in-10-minutes-35pi | |
// | |
// Given an array of city names, group the ones that are rotations of | |
// each other together. e.g.: | |
// | |
// input: ['Tokyo', 'London', 'Rome', 'Donlon', 'Kyoto', 'Paris'] | |
// output: | |
// [ |
const Bundler = require('parcel-bundler'); | |
const childProcess = require('child_process'); | |
const file = 'index.js'; | |
const options = {}; | |
const bundler = new Bundler(file, options); | |
const runBundle = process.argv.includes('run'); | |
let bundle = null; |
I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.
For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.
Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.
Kinesis Freestyle (Terrible key switches. Mushy and un-lovable)
Kinesis Freestyle Edge (Traditional layout with too many keys, mech switches, proably too big to be tented easily/properly)
Matias Ergo Pro (Looks pretty great. Have not tried.)
ErgoDox Kit (Currently, my everyday keyboard. Can buy pre-assembled on eBay.)
ErgoDox EZ (Prolly the best option for most people.)
// https://vsavkin.com/functional-typescript-316f0e003dc6 | |
class Employee { | |
constructor(public name: string, public salary: number) {} | |
} | |
class Department { | |
constructor(public employees: Employee[]) {} | |
works(employee: Employee): boolean { |
//returns a promise that resolves after a time | |
function wait(time){ | |
return new Promise(function(resolve){ | |
window.setTimeout(resolve,time); | |
}); | |
} | |
//a function that, if called with just a time, | |
//returns a function that will return a wait... | |
//that resolves with whatever value it was given |