Skip to content

Instantly share code, notes, and snippets.

@Vercidium
Vercidium / greedyvoxelmeshing
Last active May 4, 2024 09:03
Greedy Voxel Meshing ported to C#
// Code ported from https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/
// Note this implementation does not support different block types or block normals
// The original author describes how to do this here: https://0fps.net/2012/07/07/meshing-minecraft-part-2/
const int CHUNK_SIZE = 32;
// These variables store the location of the chunk in the world, e.g. (0,0,0), (32,0,0), (64,0,0)
@danielroe
danielroe / settings.json
Last active May 4, 2024 08:55
VScode settings for a minimal UI
{
// Disable telemetry
"telemetry.telemetryLevel": "off",
// Zen mode
"zenMode.fullScreen": false,
"zenMode.hideTabs": true,
"zenMode.centerLayout": false,
// Theming
"workbench.iconTheme": "city-lights-icons-vsc",
"editor.fontFamily": "Dank Mono",
@yuvve
yuvve / Obsidian Git-Mobile.md
Last active May 4, 2024 08:53
Automatically sync notes to and from git repository whenever you open and close Obsidian on mobile.

How to automatically sync Obsidian between Github and Android with Termux and Tasker

I use Obsidian git on PC, and this workaround (since the plugin doesn't support mobile) to seamlessly* sync my notes to and from my phone. Using these instructions you create an automation for pulling every time you open Obsidian, and pushing every time you close it.

* you can still get merge conflicts...

Preparation

  1. Install Tasker.
  2. Install Termux.
  3. Install Termux tasker plugin.
  4. Open Termux and write termux-setup-storage, give it permissions.
@vasanthk
vasanthk / System Design.md
Last active May 4, 2024 08:51
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@jeffochoa
jeffochoa / Response.php
Last active May 4, 2024 08:50
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@tvst
tvst / streamlit_app.py
Last active May 4, 2024 08:48
Simple way to run heavy computations without slowing down other Streamlit users
import streamlit as st
import concurrent.futures # We'll do computations in separate processes!
import mymodule # This is where you'll do the computation
# Your st calls must go inside this IF block.
if __name__ == '__main__':
st.write("Starting a long computation on another process")
# Pick max number of concurrent processes. Depends on how heavy your computation is, and how
# powerful your machine is.
@yanofsky
yanofsky / LICENSE
Last active May 4, 2024 08:45
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@msmuenchen
msmuenchen / README.md
Last active May 4, 2024 08:44
Flying a drone in Germany

This article intends to provide a quick refresher and reference guide for aspiring drone pilots in German territory, particularly those from outside the EU.

Disclaimer: The author is not a law professional and assumes no liability, but strives to keep this guide up-to-date and factually correct. Please check the laws yourself before conducting a flight. No commission, referrals or similar awards have been provided to the author. The guide only applies to actual EU member states and Germany specifically, unless noted otherwise. The author has no knowledge about the edge cases Switzerland, Norway, Iceland, Liechtenstein and the UK - they may or may not have adopted the EU regulations. Please file a comment if you have corrections, questions, new edge cases or links to state-specific information.

Basic EU-wide rules

German drone law follows the basic EU harmonized rules:

Drone classes

  • Drones are classified by weight and capabilities by the manufacturer:
  • C0 drones weigh below 250g (e.g. the DJ
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 4, 2024 08:42
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
@ishad0w
ishad0w / sources.list
Created December 10, 2021 16:36
Ubuntu 22.04 LTS (ARM/RISC-V) (Jammy Jellyfish) -- Full sources.list
deb http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports jammy-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse