Skip to content

Instantly share code, notes, and snippets.

@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active May 5, 2024 19:15
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

@johnrichardrinehart
johnrichardrinehart / nixos_in_virtualbox.md
Last active May 5, 2024 19:05
NixOS from "scratch" as Virtualbox Guest

Steps

New VirtualBox Machine

  1. Create a new disk image (I use VDI for compatibility with VirtualBox)
  2. Allocate some RAM (>6 GiB to start)
  3. Add some video memory and enable 3D acceleration, if needed
  4. Optional: Enable EFI (instead of BIOS)
  5. Attach nixos-minimal ISO for installation
  6. Boot into the ISO

Inside the Live CD

UEFI instructions

# My simple Speech Recognition Demonstration Routine 😊
# Made with ❤️ in Python 3 by Alvison Hunter - March 1st, 2020
# JavaScript, Python and Web Development tips at: https://bit.ly/3p9hpqj
# -----------------------------------------------------------------------
# Importing the libraries that will do the magic part 🐵
import speech_recognition as sr
import webbrowser as wb
def fn_speech_recognition():
sr.Microphone(device_index = 0)
print(f"MICs Found on this Computer: \n {sr.Microphone.list_microphone_names()}")
@diego3g
diego3g / settings.json
Last active May 5, 2024 19:04
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@wojteklu
wojteklu / clean_code.md
Last active May 5, 2024 19:00
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@tinrab
tinrab / action.ts
Last active May 5, 2024 18:59
Calling server actions in client form components
'use server';
export const signUpAction = apiAction(
signUpFormSchema,
async (data): Promise<{ }> => {
// ...
},
);
@scyto
scyto / proxmox.md
Last active May 5, 2024 18:57
proxmox cluster proof of concept

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project

Install the netcat nc command with Homebrew (otherwise Mac OS X version is really old and the interface is different):

brew install netcat

Use netcat to listen for incoming TCP connections on port 3000:

nc -l -p 3000
@BCasal
BCasal / Colaborar Proyecto GitHub.markdown
Last active May 5, 2024 18:55
Pasos a seguir para colaborar en un proyecto de GitHub

Cómo colaborar en un proyecto en GitHub

  • Fork del repositorio
  • Clonar el repositorio
  • Actualizar la rama master
  • Crear una rama
  • Hacer los cambios
  • Hacer un Pull Request

Fork del repositorio

@flipdazed
flipdazed / almgren_chriss.py
Created April 30, 2019 22:41
Linear Almgren-Chriss python model
import numba as nb
import numpy as np
def impact_perm(nu, gamma, beta):
"""Returns the permenant dollar price impact per unit time
In paper as :math:`g(\nu)`
Args: