Skip to content

Instantly share code, notes, and snippets.

#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13) and macOS Sonoma (14)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@tatsuyasusukida
tatsuyasusukida / !README-javascript-audio.md
Last active May 2, 2024 15:17
🎵 How to record audio using the Web Audio API in JavaScript

🎵 How to record audio using the Web Audio API in JavaScript

Demo video: How to record audio using the Web Audio API in JavaScript

About this article

This article describes how to record audio using the Web Audio API in JavaScript. The related resources are shown below.

@Klerith
Klerith / pasos-node-ts-jest.md
Created August 19, 2023 18:35
Note + TypeScript + Jest = Testing

Pasos para configurar Jest con TypeScript, en Node

Documentación oficial sobre Jest

  1. Instalaciones de desarrollo (super test es útil para probar Express)
npm install -D jest @types/jest ts-jest supertest
@fabioluciano
fabioluciano / kubernetes-bootstrap.sh
Last active May 2, 2024 15:14
Create kubernetes cluster using multipass instances(kvm/qemu) with microk8s ir k3s kubernetes distribution
#!/usr/bin/env bash
set -euxo pipefail
: ${MASTER_NODE_COUNT:=1}
: ${MASTER_NODE_PREFIX:=master}
: ${WORKER_NODE_COUNT:=2}
: ${WORKER_NODE_PREFIX:=worker}
lambda function
----
exports.handler = async (event) => {
console.log(event)
const customerId = event.pathParameters.customerId;
const customer = {'customerId': customerId, 'customerName': "Customer " + customerId };
const response = {
statusCode: 200,
// Uncomment below to enable CORS requests
headers: {
@jefffriesen
jefffriesen / README.md
Last active May 2, 2024 15:11
US Zip Codes

This is a d3.js visualization of US zip codes.

Original zip code dataset from Geocommons.

5MB shapefile with properties such as zipcode, state, name, population, area, more.

http://geocommons.com/overlays/54893 (Thank you Bill Greer)

This converts it nicely:

@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active May 2, 2024 15:08
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@tomasdev
tomasdev / minecraft-emoji.md
Last active May 2, 2024 15:06
Minecraft allowed emojis

Minecraft allowed emojis

Ever wondered how to insert emoji in minecraft? Well turns out Minecraft supports only a subset of emoji (old one) but you can copy-paste these in it!

Screenshot of the emojis being rendered in Minecraft

These also look great on signs!

Minecraft sign with glowing effect showcasing arrows

@benclmnt
benclmnt / advice.md
Last active May 2, 2024 15:05
NUS CS Planning

Module Planning

Here be some of my notes on how to plan your CS career (specifically NUS).

First things first, I encourage you to have your own module plan (say, in a Google Sheets). You can start with the suggested module plan, but they are quite generic and might not suit your personal goals (e.g. some advanced modules you'd like to take have prerequisites that are offered in odd semesters only).

Having your own module plan will also make you easier to include other non-academic activities too.

General advice

  • Take as many foundational (core) modules while you can. You never want to be left behind due to missing prerequisites.