Skip to content

Instantly share code, notes, and snippets.

View zeddee's full-sized avatar

Zed zeddee

View GitHub Profile
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDYXG7ZZ/Jx5N4YmsHOTH0KcT0q0ppxpbsEY/vd+o6KY [email protected]

Typescript notes

a as b is not type casting

The a as b operation may look like a type casting or type conversion operation, but it is not.

a as b actually performs a type assertion. No type conversion or "casting" happens.

Quick reference

CI_PIPELINE_SOURCE possible values:

  • push
  • web: Pipelines run from the web ui.
  • schedule
  • api
  • external
  • chat
@zeddee
zeddee / doom.txt
Created March 13, 2021 10:51 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
from pprint import pprint
import calendar
from enum import Enum, IntEnum, Flag, IntFlag
pp = pprint
# source: https://levelup.gitconnected.com/python-tricks-i-can-not-live-without-87ae6aff3af8
def sep() -> None:
print("=======================================")

Set global gitignore file

git config --global core.excludesfile '~/.gitignore'

Set default branch to main

git config --global init.defaultBranch main

pip install watchdog may fail to build on newer versions of macos because the local python is configured to build for arm64.

Either install python from the packages provided by python.org, or set the ARCHFLAG env variable by running:

export ARCHFLAGS="-arch x86_64"
pip install watchdog

source

@zeddee
zeddee / .gitignore
Created October 18, 2020 05:27 — forked from kmorcinek/.gitignore
Example .gitignore file I use for C# projects
# The following command works for downloading when using Git for Windows:
# curl -LOf http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
#
# Download this file using PowerShell v3 under Windows with the following comand:
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
#
# or wget:
# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
# User-specific files