Skip to content

Instantly share code, notes, and snippets.

@00mjk
00mjk / 00_README.md
Created June 7, 2022 16:11 — forked from LeZuse/00_README.md
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms
@00mjk
00mjk / chocolatey-script.bat
Created June 7, 2022 14:38 — forked from harisbarki/chocolatey-script.bat
Chocolatey script for automatically installing software
:: Install choco .exe and add choco to PATH
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
:: Install all the packages
:::: Browsers
choco install googlechrome -y
choco install firefox -y
choco install chromium -y
choco install googlechrome.canary -y
choco install brave -y
@00mjk
00mjk / bash.sh
Created June 5, 2022 23:06 — forked from Porges/bash.sh
Uniquely identified words of the form i18n, l10n (ignoring but preserving case, skipping words with apostrophes, using wamerican wordlist)
# to look up a word by "definition" (f2d = find):
f2d() { grep -ixe "$(echo "$1" | sed 's/[[:digit:]]\+/\\w\\{\0\\}/g')" /usr/share/dict/words; }
# to generate the word lists below:
while read word; do if [[ "${#word}" -gt 2 && "$word" != *"'"* ]]; then echo "$word ${word: 0:1} $((${#word} - 2)) ${word: -1:1}"; fi; done < /usr/share/dict/words | sort -f -k2,2 -k3,3n -k4,4 | uniq -u -i -f1 | awk '{ print $2 $3 $4 " " $1 }' > AnZ.txt
# this is mostly getting the output to come out nice:
#
# skip all words less than 3 characters long, or that have apostrophes
# print out like "word w 2 d"
@00mjk
00mjk / pc.txt
Created June 5, 2022 20:48 — forked from mrrooijen/pc.txt
Awesome PC Build
70 EUR | Case | BitFenix Prodigy (White) | http://azerty.nl/0-1831-527460/bitfenix-prodigy.html
20 EUR | Fan Front | BitFenix Spectre 230mm (Black) | http://www.informatique.nl/444497/bitfenix-spectre-pro-bff-lpro-23030w-rp.html
15 EUR | Fan Rear | BitFenix Spectre 140mm (Black) | http://www.informatique.nl/444490/bitfenix-spectre-pro-bff-lpro-140225w-rp.html
24 EUR | Fan Top | BitFenix Spectre 120mm (Black) x2 | http://www.informatique.nl/444486/bitfenix-spectre-pro-bff-lpro-12025w-rp.html
35 EUR | Fan Controller | BitFenix Recon | http://azerty.nl/0-1087-520155/bitfenix-recon-fancontroller.html
182 EUR | Motherboard | ASUS P8Z77-I Deluxe (Blue) | http://azerty.nl/producten/product_detail/4924/510802/asus-p8z77-i-deluxe-moederbord-mini-itx-lga1155-socket-z77-usb-3-0-802-11a-b-g-n-bluetooth-gigabit-ethernet-in
@00mjk
00mjk / linux_com.h
Created June 3, 2022 20:09 — forked from chenshuo/linux_com.h
If Linux kernel were exposed as COM interfaces
class Linux_0_01
{
int restart_syscall(); //0
int exit(); //1
int fork(); //2
int read(); //3
int write(); //4
int open(); //5
int close(); //6
int waitpid(); //7
@00mjk
00mjk / _.md
Created May 27, 2022 01:26 — forked from klange/_.md
11 Years of ToaruOS

11 Years of ToaruOS

This is a repost and update to an imgur album with screenshots of ToaruOS throughout its development, as imgur is no longer a viable platform for maintaining this collection.

Early Development

My first commit in the ToaruOS repository, ecd4fe2bc170b01ad700ff76c16da96993805355, was made on January 15th, 2011. This date has become ToaruOS's "birthday". It would be another six years and two weeks before ToaruOS's first real release, 1.0.

1 - eL4aHBZ - Humble Beginnings

@00mjk
00mjk / Cypher Syntax.md
Created May 26, 2022 23:45 — forked from NikhilPeri/Cypher Syntax.md
Notes from the workshop on Neo4j Cypher Syntax

Overview

Cypher is declarative

MATCH // define graph shape
(A)-[HAS]->(B)

WHERE // filter graph 
A.status = 'Active'
@00mjk
00mjk / firebase-messaging-sw.js
Created May 26, 2022 23:14 — forked from loicginoux/firebase-messaging-sw.js
Adding FCM to an html page to receive notifications and sending then via FCM ruby gem. (edit: HTTPS needed!)
// [START initialize_firebase_in_sw]
// Give the service worker access to Firebase Messaging.
// Note that you can only use Firebase Messaging here, other Firebase libraries
// are not available in the service worker.
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-messaging.js');
// Initialize the Firebase app in the service worker by passing in the
// messagingSenderId.
firebase.initializeApp({
@00mjk
00mjk / stackoverflow_to_gchat.bal
Created May 26, 2022 23:11 — forked from IMS94/stackoverflow_to_gchat.bal
A Ballerina program to get latest Ballerina tagged stackoverflow questions as notifications to the google chat
import ballerina/http;
import ballerina/time;
import ballerina/log;
configurable string chatId = ?;
configurable string chatKey = ?;
configurable string chatToken = ?;
// How often will this program be executed
configurable int intervalSeconds = 60 * 10;
@00mjk
00mjk / PauseMenu.cs
Created May 24, 2022 16:04 — forked from MagicLike/PauseMenu.cs
Pause menu example in Unity (C#)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using System;
public class PauseMenu : MonoBehaviour
{
public void MainMenu()