Skip to content

Instantly share code, notes, and snippets.

@mahtaran
mahtaran / upgrade-nvm-node.ps1
Created July 10, 2023 15:44
A PowerShell upgrade script for https://github.com/coreybutler/nvm-windows, which will carry over globally installed npm (and pnpm) packages
if ($args -contains "--help" -or $args.Length -eq 0) {
Write-Host "Usage: .\upgrade-node.ps1 <version> [--help] [--mock] [--no-confirm]"
Write-Host "Example: .\upgrade-node.ps1 20.4.0"
Write-Host "You can still use 'lts' or 'latest' as version"
Write-Host "Example: .\upgrade-node.ps1 latest"
Write-Host "Use the --mock flag to preview the changes without actually making them"
Write-Host "Use the --no-confirm flag to skip confirmation"
exit
}
# 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()}")
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active May 23, 2024 05:29
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@superjax
superjax / occupancy_grid_mapping_example.py
Last active May 23, 2024 05:29
An occupancy grid mapping example
# This is an implementation of Occupancy Grid Mapping as Presented
# in Chapter 9 of "Probabilistic Robotics" By Sebastian Thrun et al.
# In particular, this is an implementation of Table 9.1 and 9.2
import scipy.io
import scipy.stats
import numpy as np
import matplotlib.pyplot as plt
from tqdm import tqdm
@MrHallows
MrHallows / fastboot_help.md
Last active May 23, 2024 05:29
fastboot commands

Command:

$ fastboot help

Output:

usage: fastboot [OPTION...] COMMAND...

flashing:
@alexreardon
alexreardon / alternative-flex-naming.md
Last active May 23, 2024 05:28
Alternative flex naming

flex container

  • flex-directionmain-axis (row [horizontal] → or column [vertical] ↓)
  • justify-contentmain-axis-align
  • align-itemscross-axis-align
  • align-contentcross-axis-align-wrapped

flex child

  • align-selfcross-axis-align-override
@adibhanna
adibhanna / keymap.json
Created April 18, 2024 17:55
zed keymaps
[
{
"context": "Editor && VimControl && !VimWaiting && !menu",
"bindings": {
"ctrl-w z": "workspace::ToggleZoom",
"ctrl-w t": "terminal_panel::ToggleFocus",
"g ]": "editor::GoToDiagnostic",
"g [": "editor::GoToPrevDiagnostic",
"g r": "editor::FindAllReferences",
"shift-k": "editor::Hover",
@allenk
allenk / deepclean.cmd
Last active May 23, 2024 05:25
ASUS Software Clean Up Tool
@echo off
:: ------------------------------------------------------------------------------------------------------------
:: Clean Up ASUS All
:: ------------------------------------------------------------------------------------------------------------
:: The tool helps to clean up all ASUS software from system
:: ------------------------------------------------------------------------------------------------------------
:: Before running the tools,
:: 1. Complete backup your system.
:: 2. Disable ASUS Apps from BIOS (MyASUS and Armoury)
:: 3. Run ASUS remove tools (Armoury Crate Uninstall Tool.exe, or geek_uninstall.exe).
@windstriver
windstriver / parametric_plot_with_tikz.tex
Created August 30, 2015 01:32
An example of parametric plot using TikZ from *TikZ & PGF Manual*.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=2]
\draw[gray,very thin] (-1.9,-1.9) grid (2.9,3.9)
[step=0.25cm] (-1,-1) grid (1,1);
\draw[blue] (1,-2.1) -- (1,4.1); % asymptote
\draw[->] (-2,0) -- (3,0) node[right] {$x(t)$};
@jotaelesalinas
jotaelesalinas / runcommand.py
Created May 12, 2016 23:20
Runs an external command in Python and returns exit code, stdout and stderr contents.
# runcommand.py
# Handy function that executes an external command in the shell
# and returns 3 values: exit code of the command, its standard output
# and its error output.
# If you run the script directly, an example is provided:
# first it will run a successful command and then one with errors
# (you may want to modify them if not running a Unix system).
import subprocess