Skip to content

Instantly share code, notes, and snippets.

View chinkiko's full-sized avatar
🎯
Focusing

ChinKIKO chinkiko

🎯
Focusing
  • NULL
  • EARTH
View GitHub Profile
@jakub-g
jakub-g / javascript-to-typescript-cheatsheet.md
Last active February 14, 2024 00:50
Migrate/convert JavaScript to TypeScript cheatsheet

Relevant official docs

Migrating NodeJS CJS files (require, module.exports)

First steps

  1. Rename the file from .js to .ts
  2. Change module.exports = to export =
  3. Change all exports.foobar = to export const foobar =
  4. Update top-level require calls to static import.
@jakub-g
jakub-g / async-defer-module.md
Last active July 23, 2024 21:22
async scripts, defer scripts, module scripts: explainer, comparison, and gotchas

<script> async, defer, async defer, module, nomodule, src, inline - the cheat sheet

With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.

This document is a comparison of various ways the <script> tags in HTML are processed depending on the attributes set.

If you ever wondered when to use inline <script async type="module"> and when <script nomodule defer src="...">, you're in the good place!

Note that this article is about <script>s inserted in the HTML; the behavior of <script>s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)

@nadavrot
nadavrot / Matrix.md
Last active July 29, 2024 00:58
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@nurimelih
nurimelih / AwesomeCourses.md
Created January 25, 2018 08:05 — forked from teocci/AwesomeCourses.md
List of awesome university courses for learning Computer Science!

Awesome Courses Awesome

Introduction

There is a lot of hidden treasure lying within university pages scattered across the internet. This list is an attempt to bring to light those awesome courses which make their high-quality material i.e. assignments, lectures, notes, readings & examinations available online for free.

Table of Contents

@flaki
flaki / T2_OPENWRT.md
Created February 11, 2016 15:19
Helpful commands for the OpenWRT system used on the Tessel 2

OpenWRT for Dummies - Tessel 2 Edition

A kind-of-FAQ for operating the Tessel 2 from the commandline (via SSH, serial console or tessel root).

How to find out what commands are executed by the CLI?

Prefix your commands with "DEBUG=commands:usb" to learn about the commands sent to the device:

$ DEBUG=commands:usb t2 wifi -l

INFO Looking for your Tessel...
@tiann
tiann / auto_switch_kb.py
Created December 2, 2015 06:51
auto switch keyboard to english in specific applications
#! /usr/bin/env python
# coding: utf-8
'''
auto switch keyboard between different applications
if you want to change the app list, modify the var 'ignore_list'
'''
from AppKit import NSWorkspace, NSWorkspaceDidActivateApplicationNotification, NSWorkspaceApplicationKey
@protrolium
protrolium / ffmpeg.md
Last active July 23, 2024 06:07
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@staltz
staltz / introrx.md
Last active July 29, 2024 05:55
The introduction to Reactive Programming you've been missing
@whoeverest
whoeverest / acm-books.md
Last active January 2, 2023 10:37
Full download books from ACM.

Computers

  • Aspect-Oriented Programming with the e Verification Language
  • No Code Required
  • The Essential Persona Lifecycle

Artificial Intelligence

  • Ai for game developers
  • Computational Intelligence
@johntyree
johntyree / getBlockLists.sh
Last active June 4, 2024 12:30
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'