Skip to content

Instantly share code, notes, and snippets.

View Nezteb's full-sized avatar
💣
hello world'); DROP TABLE Statuses;--

Noah Betzen Nezteb

💣
hello world'); DROP TABLE Statuses;--
View GitHub Profile
@lukepighetti
lukepighetti / .zshrc
Created March 3, 2023 15:41
marksman environment for note taking https://youtu.be/8GQKOLh_V5E
# launch daily notes with `notes`
# launch specific notes with `notes woodworking`
# this is a cloud synced file, so it's live on all my devices
function notes(){
SUBJECT="${1:=daily}"
if [ -z "$SUBJECT" ]
then
(cd ~/Documents/notes && hx NOTES.md)
else
(cd ~/Documents/notes && hx "${SUBJECT:u}.md" NOTES.md)
@benvp
benvp / _paddle_script.html.eex
Last active April 18, 2024 12:52
Integrate Elixir/Phoenix with paddle.com -> See https://twitter.com/benvp_/status/1617624545791205379
<script src="https://cdn.paddle.com/paddle/paddle.js"></script>
<%= if vendor_id = Application.get_env(:my_app, :paddle)[:vendor_id] do %>
<%= if Application.get_env(:my_app, :paddle)[:sandbox] do %>
<script type="text/javascript">
Paddle.Environment.set("sandbox");
Paddle.Setup({ vendor: <%= vendor_id %> });
</script>
<% else %>
<script type="text/javascript">

Notes on Modern UI Development: Taking Ideas from Spaced Repetition

Introduction

I have been working on a modern typing training application for the last couple of days. One of the main motivations was to build an app with a modern UI and minimal distractions, enabling to fully focus on the training aspect. You can read more about the original idea and thought process here as well as some notes on iterating over the details here.

After adding some minimal auto close functionalities for the code training section, you can read about it here, another important feature was to make the text training part more entertaining.

@mraaroncruz
mraaroncruz / working_webserver.livemd
Created September 1, 2022 23:22
A livebook with a running http server that can accept requests

Working webserver

Mix.install([
  {:plug_cowboy, "> 0.0.0"},
  {:jason, "> 0.0.0"},
  {:httpoison, "> 0.0.0"}
])
@sorentwo
sorentwo / start_oban_web.livemd
Created July 27, 2022 16:38
Single Page Oban Web

Single Page Oban Web

Application.put_env(:sample, Sample.Repo, database: "oban_dev")

Application.put_env(:phoenix, :json_library, Jason)

Application.put_env(:sample, Sample.Endpoint,
  http: [ip: {127, 0, 0, 1}, port: 5001],
  server: true,
@meeech
meeech / a_help-osx-borked-my-nix.md
Last active March 14, 2024 16:32
Some steps to (hopefully) help you fix your Nix install on OS X after an upgrade.

Apple Borked my Nix!

Ok, so you've had nix (home-manager) working fine. Then Apple tells you it's time to update.

Ok. Reboot. Oops. It has now broken your Nix setup. Here's some stuff to work through. YMMV.

Note: This is what worked for me, who was just using nix + home-manager. The upgrade that I last did that caused all these issues was 12.3.X > 12.4

Useful Links

@paulloz
paulloz / content.md
Last active May 12, 2024 20:22
Visual Studio Code and C# code completion and debugger for Godot

Visual Studio Code and C# code completion and debugger for Godot

Ok, this is a quick document to guide you through the setup of a Godot project in Visual Studio Code.
I'll assume you have a working C# environment installed. Note that on Linux, you might need to install Mono for everything to work fine with Godot 3.x.

1. Install the necessary extensions

First off, make sure you have the following extensions installed and active in Visual Studio Code:

@rmetzger
rmetzger / gist:e556bfda8082bceeae6a32e7e0208bb6
Last active January 16, 2022 11:36
Free Docker on Mac Alternative using Hyperkit from minikube
brew install minikube
brew install hyperkit
minikube config set driver hyperkit
minikube start --memory 8192 --cpus 5 --disk-size=80GB

brew install docker
# point docker to the minikube env
eval $(minikube -p minikube docker-env)
# validate setup
@nitred
nitred / optimal_mtu.md
Last active May 21, 2024 13:48
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@kepano
kepano / obsidian-web-clipper.js
Last active May 22, 2024 10:51
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */