Skip to content

Instantly share code, notes, and snippets.

@Knewest
Knewest / 1_QuickReinstallBetterDiscord.md
Last active March 29, 2024 07:42
Reinstall BetterDiscord seconds after Discord uninstalls it against your will. Avoid using the time consuming installer with this trick.
@belgattitude
belgattitude / ci-yarn-install.md
Last active March 29, 2024 07:39
Composite github action to improve CI time with yarn 3+ / node-modules linker.
@ali-awwad
ali-awwad / laravel-on-azure-web-app-startup-command.sh
Last active March 29, 2024 07:37
Laravel On Azure Web Apps. Enabling Queues and Job Workers as well
# name this file as "startup.sh" and call it from "startup command" as "/home/startup.sh"
# check out my YouTube video "https://youtu.be/-PGhVFsOnGA"
cp /home/default /etc/nginx/sites-enabled/default
cp /home/php.ini /usr/local/etc/php/conf.d/php.ini
# install support for webp file conversion
apt-get update --allow-releaseinfo-change && apt-get install -y libfreetype6-dev \
libjpeg62-turbo-dev \
@imanubhardwaj
imanubhardwaj / blob-resize.js
Created January 16, 2019 05:01
Resize a blob
function processfile(blob) {
// read the files
var reader = new FileReader();
reader.readAsArrayBuffer(blob);
reader.onload = function (event) {
// blob stuff
var blob = new Blob([event.target.result]); // create blob...
window.URL = window.URL || window.webkitURL;
var blobURL = window.URL.createObjectURL(blob); // and get it's URL
@yasirkula
yasirkula / BatchExtractMaterials.cs
Last active March 29, 2024 07:35
Batch extract materials from 3D model assets in Unity
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using System.IO;
public class BatchExtractMaterials : EditorWindow
{
private enum ExtractMode { Extract = 0, Remap = 1, Ignore = 2 };
[System.Serializable]
@yewtudotbe
yewtudotbe / what-happened-downtime-july2023.md
Last active March 29, 2024 07:32
Why yewtu.be was down? (July 2023)

On the 30th of June, my cloud provider, Oracle Cloud, decided to shutdown all my servers hosted on two Oracle Cloud accounts.
It is known that this provider will randomly ban accounts without any reason.

Why yewtu.be doesn't accept new registrations nor logging into an account?

Unfortunately and this is 100% my fault for forgetting that, I only had data duplication between servers located in the two Oracle Cloud accounts and no backups.
I thought that I wouldn't get all my accounts in trouble at the same time and able to recover the data from one of the two accounts but unfortunately this turned out otherwise.

Implementing some backup was something I had in my notes for a long time but I think I forgot about it, maybe due to the huge amount of work I spend on the open source projects.
I'm deeply sorry if you have lost your subscriptions list or playlists or watch history. I did try to contact Oracle Cloud for recovering the data, I'm waiting for their answer but you should be certain that they

@guest271314
guest271314 / javascript_engines_and_runtimes.md
Last active March 29, 2024 07:31
A list of JavaScript engines, runtimes, interpreters

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on

@rangav
rangav / purgeAndroid.txt
Created December 28, 2016 03:03 — forked from tahmidsadik/purgeAndroid.txt
How to completely remove Android Studio from Mac OS X
How to Completely Remove Android Studio
Execute these commands from the terminal
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
@eqvinox
eqvinox / zammad-greasemonkey-fold-open.js
Last active March 29, 2024 07:26
Greasemonkey script to fold open zammad ticket items by default
// ==UserScript==
// @name Zammad ticket items expand-by-default
// @match https://requests.cccv.de/*
// @version 1
// @grant none
// ==/UserScript==
let seen_before = new Set();
function direct_text(parent) {
@fuxingloh
fuxingloh / UILabelSize.swift
Last active March 29, 2024 07:26
iOS Swift: How to find text width, text height or size of UILabel.
extension UILabel {
func textWidth() -> CGFloat {
return UILabel.textWidth(label: self)
}
class func textWidth(label: UILabel) -> CGFloat {
return textWidth(label: label, text: label.text!)
}
class func textWidth(label: UILabel, text: String) -> CGFloat {