Skip to content

Instantly share code, notes, and snippets.

@dadodasyra
dadodasyra / PM5_World_converter.php
Created November 5, 2023 19:24
Convert world with plugin code to leveldb (can be used with sort of a TestCommand) it freezes the server until the end of the conversion and automatically detect the base format.
<?php
$originalPath = "/root/servers/miscs/converting/lobby";
$backupPath = "/root/servers/miscs/converting/backup"; //this will create a folder under this one with the name of the world
$providerManager = new WorldProviderManager();
$writableFormats = array_filter($providerManager->getAvailableProviders(), fn(WorldProviderManagerEntry $class) => $class instanceof WritableWorldProviderManagerEntry);
$requiredOpts = [
"world" => "path to the input world for conversion",
"backup" => "path to back up the original files",
Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!newsfeed.arcor.de!newsfeed.freenet.de!novso.com!news-out.newsfeeds.com!local!news.eskimo.com!eskimo.com!scs
From: scs@eskimo.com (Steve Summit)
Newsgroups: comp.lang.c,comp.lang.c.moderated,comp.answers,news.answers
Subject: comp.lang.c Answers to Frequently Asked Questions (FAQ List)
Followup-To: poster
Date: 1 Nov 2008 10:00:10 GMT
Organization: better late than never
Lines: 7132
Approved: news-answers-request@MIT.Edu
Expires: 3 Dec 2008 00:00:00 GMT
@codecorsair
codecorsair / request.ts
Last active April 23, 2024 17:08
Simple TypeScript XMLHttpRequest
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
export interface RequestOptions {
ignoreCache?: boolean;
headers?: {[key: string]:string};
// 0 (or negative) to wait forever
timeout?: number;
@christyxgeorge
christyxgeorge / yt-transcribe.py
Created September 23, 2023 07:19
Transcribe youtube video on an Intel Mac
"""Script to run whisper on youtube video"""
## Transcribe Andrej Karpathy's video on Making GPT
## Whisper.cpp on Intel Mac takes almost an hour and a half to transcribe the 1 hr 56 min video
# Install pre-reqs:
# !pip install git+https://github.com/openai/whisper.git
# !pip install pytube
import pytube as pt
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@GetVladimir
GetVladimir / Force-RGB-Color-on-M1-Mac.md
Last active April 23, 2024 17:06
Force RGB Color on M1 Mac

Force RGB Color on M1 Mac

How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.

This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.

Force RGB Color on M1 Mac

Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4

The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.

@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@letanure
letanure / estados-cidades.json
Last active April 23, 2024 17:02
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@sundowndev
sundowndev / GoogleDorking.md
Last active April 23, 2024 16:59
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@lawrenceching
lawrenceching / install-frp-as-systemd-service.sh
Last active April 23, 2024 16:53
Install frp as systemd service
# Update on 2024/04/13
# 1. Improved OS compatibility: try wget and then curl for downloading files.
#
# Update on 2024/01/26
# 1. Thanks to GitHub user @aka-Ani, this script now will install latest version of frp:
# https://gist.github.com/lawrenceching/41244a182307940cc15b45e3c4997346?permalink_comment_id=4851742#gistcomment-4851742
# 2. Use .toml conf file as .ini became lagacy
#
# Update on 2023/06/19
# 1. frp no longer provide systemctl service file. This script creates frpc/fprs systemctl service file by itself