Skip to content

Instantly share code, notes, and snippets.

@AFAgarap
AFAgarap / autoencoder-pytorch.ipynb
Last active April 28, 2024 12:30
PyTorch implementation of an autoencoder.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 28, 2024 12:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@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",
@noghartt
noghartt / cc.md
Last active April 28, 2024 12:26
Resources to learn more about Computer Science and related stuffs
module SystemF where
open import Agda.Primitive
open import Prelude
open import Data.List
weaken-∈ : {a : Set} (Γ₁ : List a) {Γ x y} x ∈ (Γ₁ ++ Γ) x ∈ (Γ₁ ++ y ∷ Γ)
weaken-∈ [] (zero refl) = suc (zero refl)
weaken-∈ [] (suc i) = suc (suc i)
weaken-∈ (x ∷ Γ₁) (zero p) = zero p
@alexishida
alexishida / nginx-config-auth-cert-ssl.md
Last active April 28, 2024 12:23
Tutorial to configure Nginx client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Original: https://gist.github.com/mtigas/952344

Convert SSL certificate from CRT format to PEM

openssl x509 -in server.crt -out server.der -outform DER
openssl x509 -in server.der -inform DER -out server.pem -outform PEM
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 12:22
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@bigspawn
bigspawn / download-from-facecast.md
Last active April 28, 2024 12:18
How download video from facecast.net
@ksnabb
ksnabb / wgs84-distance.js
Created April 25, 2014 07:23
JavaScript: WGS84 distance (Harvesin)
/*
Pass in two WGS84 points as arrays in x y order to calcuate the
meter distance between them.
distance([longitude1, latitude1], [longitude2, latitude2])
The distance is calculated with the help of the harvesin formula
*/
var distance = function(coords1, coords2) {