Skip to content

Instantly share code, notes, and snippets.

Windows Setup Notes

based on original document from Alan Stevens

Installation

IMPORTANT:

  • Install using Local Account first, attach Microsoft account later

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@zparnold
zparnold / one_liner.sh
Last active April 25, 2024 21:56
A simply script to delete all failed pods from Kubernetes
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
@andrijac
andrijac / gist:3b5c04d29db3fd12e0ee576324f09741
Created January 9, 2018 10:13 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@alanstevens
alanstevens / Windows11_Setup.md
Last active April 9, 2024 13:37
Windows 11 Setup

This guide was created using Microsoft Windows 11 Pro

Version 21H2 build 22000.194

Installation

System Updates:

  • Settings -> Windows Update
  • Install all updates

Powershell Execution Policy:

  • launch Windows Powershell as administrator and execute:
@davidfowl
davidfowl / websockets.cs
Last active May 15, 2023 05:31
Simple WS ASP.NET Core
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
namespace SimpleWebSockets
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
@camieleggermont
camieleggermont / UpdateIISExpressCertificate.ps1
Last active November 18, 2023 20:49
This powershell script generates a new certificate, removes the old certificate assignments from the IISExpress ssl ports and adds the newly generated one. The certificate is also copied over to the Trusted Root Certificate Authorities.
$cert = New-SelfSignedCertificate -DnsName "localhost", "localhost" -CertStoreLocation "cert:\LocalMachine\My" -NotAfter (Get-Date).AddYears(5)
$thumb = $cert.GetCertHashString()
For ($i=44300; $i -le 44399; $i++) {
netsh http delete sslcert ipport=0.0.0.0:$i
}
For ($i=44300; $i -le 44399; $i++) {
netsh http add sslcert ipport=0.0.0.0:$i certhash=$thumb appid=`{214124cd-d05b-4309-9af9-9caa44b2b74a`}
}
@fabiosoft
fabiosoft / Program.cs
Created February 2, 2017 10:10
C# Sudoku Generator
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static int[,] grid = new int[9, 9];
@coryhouse
coryhouse / webpack.config.dev.js
Last active April 15, 2023 15:08
Development Webpack config for "Building a JavaScript Development Environment" on Pluralsight
import path from 'path';
export default {
debug: true,
devtool: 'inline-source-map',
noInfo: false,
entry: [
path.resolve(__dirname, 'src/index')
],
target: 'web',
@wojteklu
wojteklu / clean_code.md
Last active April 26, 2024 16:51
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules