Skip to content

Instantly share code, notes, and snippets.

@mahemoff
mahemoff / README.md
Last active March 28, 2024 12:23
Vim Terminal Mode - A short introduction

Vim has a Terminal Mode!

Since v8.1 (May 2018), Vim has shipped with a built-in terminal. See https://vimhelp.org/terminal.txt.html or type :help terminal for more info.

Why use this? Mainly because it saves you jumping to a separate terminal window. You can also use Vim commands to manipulate a shell session and easily transfer clipboard content between the terminal and files you're working on.

Key Bindings

@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 12:22
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@mateuszkwiatkowski
mateuszkwiatkowski / vscode-remote-ssh-freebsd.md
Last active March 28, 2024 12:22
Configure FreeBSD to work with VScode's remote ssh extension

This procedure was tested on FreeBSD-CURRENT build from d8819d88af52.

  1. Enable linuxulator and install linux userland:
    # sysrc linux_enable="YES"
    # service linux start
    # pkg install linux_base-c7
    
@jonashaag
jonashaag / gist:7ca5b19abf537a447d0de1b923043f45
Last active March 28, 2024 12:20
T60/RT60, C50/C80, D in Python
import librosa
from scipy.signal import butter, lfilter
SR = 8000
NFFT = 256 # change ~proportionally to SR
def butter_bandpass(lowcut, highcut, fs, order=5):
nyq = 0.5 * fs
low = lowcut / nyq
@krishnamurthydasari
krishnamurthydasari / Git Notes
Last active March 28, 2024 12:20
Git Notes
Creating new repository:
========================
Create a new repository on GitHub by selecting initialize this repository with README.
Clone repository using below commands,
git clone https://github.com/krishnamurthydasari/TestProject.git
touch NewFile.txt
git add NewFile.txt
git status
@danidiaz
danidiaz / netrw.txt
Created October 7, 2016 20:57
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@amunchet
amunchet / noVNCCopyPasteProxmox.user.js
Last active March 28, 2024 12:17
Copy/Paste for noVNC Proxmox
// ==UserScript==
// @name noVNC Paste for Proxmox
// @namespace http://tampermonkey.net/
// @version 0.2a
// @description Pastes text into a noVNC window (for use with Proxmox specifically)
// @author Chester Enright
// @match https://*
// @include /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none
@ardubev16
ardubev16 / flipper2mct.py
Created May 7, 2023 17:29
Convert Flipper Zero Mifare Classic 1k & 4k dumps to MCT (Mifare Classic Tools). Fixed version (for 4k) of https://github.com/whyn0/FlipperNFC2MCT
import argparse
import re
import logging
logging.basicConfig(
level=logging.INFO,
format="[%(levelname)s] %(message)s",
)
parser = argparse.ArgumentParser(
@gopsmith
gopsmith / DisableBigSurMonterey.sh
Last active March 28, 2024 12:09 — forked from b0gdanw/DisableBigSur.sh
Disable Big Sur and Monterey services
#!/bin/zsh
# CREDITS: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Big Sur revision by b0gdanw https://gist.github.com/b0gdanw/40d000342dd1ba4d892ad0bdf03ae6ea
# TEMPORARILY disabling (e.g. STOPPING via 'bootout') unwanted services on macOS 11 Big Sur and macOS 12 Monterey:
# This version is for a special boot that optimizes for real-time music performance and streaming video.
# Due to the read-only system volume introduced with macOS Catalina, this script can NOT be run in Recovery mode's Terminal.
# For my purposes I leave WiFi enabled, for streaming video to a local router with no internet connection.