Skip to content

Instantly share code, notes, and snippets.

@itod
itod / split_keyboards.md
Last active April 24, 2024 15:50
Every "split" mechanical keyboard currently being sold that I know of
@chranderson
chranderson / nvmCommands.js
Last active April 24, 2024 15:49
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@lopspower
lopspower / README.md
Last active April 24, 2024 15:49
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@ih2502mk
ih2502mk / list.md
Last active April 24, 2024 15:48
Quantopian Lectures Saved
func DoReq() error {
resp, err := http.Get("http://localhost:8080/ping")
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return errors.New("bad response")
}
@fitzypop
fitzypop / starship_git_bash_windows.md
Last active April 24, 2024 15:46
Installing Starship.rs on Git Bash for Windows

Installing Starship prompt on Git Bash for Windows

Source: https://bleepcoder.com/starship/640385008/unable-to-install-on-windows-git-bash-configuration-not

All scripts should be ran in your git bash terminal, not cmd or ps.

  1. Make/Choose folder where to install: mkdir -p ~/bin/starship && cd ~/bin
  2. Download the install script: curl -fsSL https://starship.rs/install.sh > ./install.sh
  3. Run install script: ./install.sh --bin-dir /c/Users/<username>/bin/starship/ --platform pc-windows-msvc
  4. Finally add the following to the end of your .bashrc file:
@macshome
macshome / IOKit.swift
Last active April 24, 2024 15:45
This playground shows you a few different ways to get device info via IOKit.
// This playground shows you a few different ways to get device info via IOKit.
// If you want to explore IOKit and look for interesting data I would download
// the Additional Developer Tools from Apple and use the IORegistryExplorer app.
// It makes it super easy to poke around in the IOKit planes.
import IOKit
import Foundation
// For convient access we can make a computed getter for the PlatformExpert.
// Traditionally this has been where you go to find all sorts of data about the
@sergiecode
sergiecode / instalacion-react.md
Last active April 24, 2024 15:44
Instalaciones necesarias para curso ReactJS de Sergie Code
@arshednabeel
arshednabeel / vicsek.py
Last active April 24, 2024 15:41
A minimal implementation of the Vicsek model in ~50 lines of code
import numpy as np
from tqdm import trange
def get_neighbour_matrix(x, L, R):
dx = np.subtract.outer(x[:, 0], x[:, 0])
dy = np.subtract.outer(x[:, 1], x[:, 1])
dx[dx > (L / 2) ** 2] -= (L / 2) ** 2
dy[dy > (L / 2) ** 2] -= (L / 2) ** 2
pair_dist = dx ** 2 + dy ** 2
@SoabY
SoabY / JetBrains products Activation code until 15 May 2024
Created October 1, 2023 08:04
JetBrains products Activation code until 15 May 2024
8Z6IT0PIZH-eyJsaWNlbnNlSWQiOiI4WjZJVDBQSVpIIiwibGljZW5zZWVOYW1lIjoiSHVuYW4gTm9ybWFsIFVuaXZlcnNpdHkiLCJhc3NpZ25lZU5hbWUiOiJTdGFyayB6aGFuZyIsImFzc2lnbmVlRW1haWwiOiJzdGFyazE5ODUyMDIwQGdtYWlsLmNvbSIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAyNC0wNS0xNSIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUFMiLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDI0LTA1LTE1IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJSU0MiLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6dHJ1ZX0seyJjb2RlIjoiR08iLCJwYWlkVXBUbyI6IjIwMjQtMDUtMTUiLCJleHRlbmRlZCI6ZmFsc2V9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