Skip to content

Instantly share code, notes, and snippets.

View psygo's full-sized avatar
🎯
focusing

Philippe Fanaro psygo

🎯
focusing
View GitHub Profile
@psygo
psygo / autobind_decorator.ts
Created October 28, 2020 00:12
An "Autobind" Decorator in TypeScript
// From Max Schwarzmüller's Understanding TypeScript - 2020 Edition on Udemy.
// A method is just a function with a property as a value.
function Autobind(_: any, __: string, descriptor: PropertyDescriptor) {
const originalMethod = descriptor.value;
const adjDescriptor: PropertyDescriptor = {
configurable: true,
enumerable: false,
get() {
@psygo
psygo / academind_ts_notes.md
Created November 5, 2020 21:24
Academind's TypeScript Course Notes

Academind's Tutorial

Overview

  • Static error checking is always better than runtime crazy ones.
@psygo
psygo / puppeteer.md
Last active December 23, 2020 23:32
JS Tests with Puppeteer
@psygo
psygo / toc.md
Created December 28, 2020 22:14
Markdown/HTML Table of Contents with Github's CSS
@psygo
psygo / sum.hs
Created January 22, 2021 02:37
Recursively Sum with Haskell
-- My recursive version of a sum
mySum x y = if y == 0
then x
else mySum (x + 1) (y - 1)
@psygo
psygo / fic.dart
Last active February 12, 2021 20:09
FIC: Fast Immutable Collections Motivation Demonstration
import "package:collection/collection.dart";
import "package:fast_immutable_collections/fast_immutable_collections.dart";
import "package:meta/meta.dart";
//------------------------------------------------------------------------------
void main() {
//----------------------------------------------------------------------------
print("With Regular Collections\n\n");
@psygo
psygo / docker_setup.md
Created February 13, 2021 20:40
Pi Hole Setup
@psygo
psygo / .vimrc
Created February 18, 2021 01:37
Do 90% of What Vim Plugins with Only Vim
set hlsearch
" Don't bother with pretending that it wants to be compatible with Vi
set nocompatible
" Enable syntax and plugins (for netrw)
syntax enable
filetype plugin on
" Finding Files:
@psygo
psygo / gists.code-snippets
Created February 24, 2021 14:18
Gists for Working on Projects with Marcelo Glasberg
{
"Test Snippet": {
"scope": "dart",
"prefix": "texg",
"body": [
"",
"test(\"$1\", () {",
" $2",
"});",
"",
@psygo
psygo / artix.md
Created February 26, 2021 14:10
Arch/Artix Installation (also includes dual-booting with Windows)