Skip to content

Instantly share code, notes, and snippets.

View u9g's full-sized avatar
💯
on my grind!

u9g

💯
on my grind!
View GitHub Profile
@Scherso
Scherso / WaysToBrickAUnixSystem.md
Last active May 7, 2023 01:02
Guide to installing OpenBSD

Ways To Not Use Your Unix Machine

(Run these as root :trollface:)

rm Remove Command

@NEZNAMY
NEZNAMY / end.md
Last active November 14, 2022 12:38
Why I don't want to work on TAB anymore - the rise and inevitable fall (my full story)

Introduction

This paste goes through my 5 year experience of developing the plugin, which started in 2016. It explains how it all started, what I went through, how I got to this point and why I don't want to do this anymore. It contains behind-the-scenes information and experience which end users have no idea about and most of them don't even care about.

How it all began

I will not go through my whole minecraft history, I will start at the point where I decided to make my own plugins for my server. After I decided to close my last server, which was in 2016, I was left with plugin development knowledge, which I wanted to use in some way.

Back then bot attacks were a popular thing where I lived and no public plugins offered satisfying protection. I went through all available anti-bot plugins and took the best out of them. Then I decided to upload it as a paid plugin to spigot. One of the requirements is to have 3 free plugins. For that reason, I made 3 random small plugins (one of them literally had 7 lin

/* global __DEV__ */
import React, { useState, useEffect, useRef } from "react"
import {
facebookAppId,
facebookDisplayName,
iosOneSignalAppId,
androidOneSignalAppId,
sentryDsn,
} from "./app.json"
import { version } from "./package.json"
@nojvek
nojvek / format-json.ts
Last active November 17, 2023 18:22
Json pretty printer that respects maximum line length
// @ts-ignore
import units from 'mdn-data/css/units.json';
const widgetSample = {
widget: {
debug: `on`,
window: {
title: `Sample Konfabulator Widget`,
name: `main_window`,
dimensions: {

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@pmarreck
pmarreck / email_header_parser.rb
Last active August 4, 2023 09:36
Superfast email header parser in Ruby, using regular expressions. This solution is 250 times faster than using the "Mail" gem. :O Time with my regex: 0.063965 seconds Time with Mail gem: 16.327161 seconds Note that I included some encoding-fix code. YMMV and encoding fixes are all debatable or fail in some corner case.
require 'ap'
require 'mail'
# String monkeypatch
# This is one of many possible "encoding problem" solutions. It's actually an intractable problem
# but you'd have to read "Gödel, Escher, Bach" to understand why...
class String
def clean_utf8
# self.force_encoding("UTF-8").encode("UTF-16BE", :invalid=>:replace, :replace=>"?").encode("UTF-8")
unpack('C*').pack('U*') if !valid_encoding?
@graywolf336
graywolf336 / BukkitSerialization.java
Last active June 1, 2024 14:21
Serialize and deserialize the player's inventory, including armor and content.
/**
* Converts the player inventory to a String array of Base64 strings. First string is the content and second string is the armor.
*
* @param playerInventory to turn into an array of strings.
* @return Array of strings: [ main content, armor content ]
* @throws IllegalStateException
*/
public static String[] playerInventoryToBase64(PlayerInventory playerInventory) throws IllegalStateException {
//get the main content part, this doesn't return the armor
String content = toBase64(playerInventory);