Skip to content

Instantly share code, notes, and snippets.

@powerumc
powerumc / remove-mono.sh
Last active May 7, 2024 10:57
Uninstalling Mono on Mac OS X
#!/bin/sh -x
#This script removes Mono from an OS X System. It must be run as root
rm -r /Library/Frameworks/Mono.framework
rm -r /Library/Receipts/MonoFramework-*
for dir in /usr/bin /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man5; do
(cd ${dir};
@milleniumbug
milleniumbug / java_rant.txt
Last active May 7, 2024 10:55
why Java sucks
Let's start with: Java is a language that one would create when looking at the state of C++ in early 90's and thinking how can I make it "better" in terms of being error prone.
But this was only an evolution instead of a revolution STL introduced as a way of programming
(sure, they weren't first, but I'd say they were the first to introduce it to masses)
The rest is a consequence of being backward
Problem with null pointers? Still there
Speaking of pointers in Java, I like how Java fans continuously say "they're not pointers, they're references"
But guess what happens when you access a null reference? A NullPointerException is thrown
So what I don't like?
Collections API. Just terrible.
The "unmodifiable" lists are your regular lists that throw exceptions on modifications
@bladeSk
bladeSk / Unity-Linux-VSCode-Intellisense-Debugger.md
Last active May 7, 2024 10:52
How to install Unity3D on Ubuntu based Linux distros (Kubuntu, Xubuntu, POP_OS, Mint, Neon, Zorin, etc.).

How to install Unity3D on Ubuntu based Linux distros (Kubuntu, Xubuntu, POP_OS, Mint, Neon, Zorin, etc.).

This guide details how to install UnityHub, Unity, VS Code and how to get full C# support with IntelliSense and debugging.

Tested on Kubuntu 22.04.

Installing Unity Hub

Unity Hub won't run on Ubuntu newer than 20.04 because it depends on an outdated libssl. We need to manually install the package from 20.04:

@ganapativs
ganapativs / iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup.md
Last active May 7, 2024 10:52
iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup
@kwonghung-YIP
kwonghung-YIP / backup-docker-secrets.sh
Created October 15, 2019 03:26
Shell script for export all secrets defined in docker swarm
#!/bin/bash
service_name="backup-all-secrets"
secret_list=( `docker secret ls --format "{{ .Name }}"` )
cmd="docker service create \
--name $service_name \
--constraint node.hostname==`hostname` "
for secret in "${secret_list[@]}"
@noahcoad
noahcoad / GoAwayModalDialogs.ahk
Created January 3, 2013 21:04
Automates away pesky modal dialogs.
; ==========================================================================================
; == Modal Dialog Automation
; ==
; == Automates away pesky modal dialogs by applying a default response when they pop up
; == Helper functions are at the bottom
; ==========================================================================================
; Defaults to fast no-regex title matching
SetTitleMatchMode, 2
@sgdc3
sgdc3 / jsontomidi.js
Last active May 7, 2024 10:49
LittleBigPlanet Music Sequencer MIDI Dumper
/*
* LittleBigPlanet Music Sequencer MIDI Dumper
* NodeJS script that extracts music sequencer data from LBP levels in JSON format (jsoninator format)
*
* Author: @sgdc3
* Version: 0.1
* Latest Update: 06 May 2024
*
* HINT: You can obtain the JSON level data using https://github.com/ennuo/toolkit/tree/main/tools/jsoninator
*
@In-line
In-line / Dockerfile
Last active May 7, 2024 10:49
AMD 7900 XTX Stable Diffusion Web UI docker container (ROCM 5.5_rc4)
FROM rocm/composable_kernel:ck_ub20.04_rocm5.5_rc4
RUN mkdir /SD
# Clone SD
WORKDIR /SD
RUN git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
WORKDIR /SD/stable-diffusion-webui
RUN git reset --hard 22bcc7be428c94e9408f589966c2040187245d81
@AlexMikhalev
AlexMikhalev / get-obsidian-posts.py
Created January 19, 2021 13:46
Sync notion to obsidian world md
from notion.client import NotionClient
import datetime
import os
from slugify import slugify
import re
import requests
import time
import hashlib
import shutil
import sys