Skip to content

Instantly share code, notes, and snippets.

View vitran96's full-sized avatar

Chris vitran96

View GitHub Profile
@flyxyz123
flyxyz123 / add_alacritty_to_context_menu.reg
Last active November 4, 2023 23:35 — forked from emlautarom1/add_alacritty_to_context_menu.reg
Add Alacritty terminal emulator to Windows 10 context menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\alacritty]
@="Open Alacritty here"
"Icon"="D:\\Program Files\\Scoop\\apps\\alacritty\\current\\alacritty.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\alacritty\command]
@="\"D:\\Program Files\\Scoop\\apps\\alacritty\\current\\alacritty.exe\" --working-directory \"%V"
[HKEY_CLASSES_ROOT\Drive\shell\alacritty]
@cgbeutler
cgbeutler / ShapePolygon2D.gd
Created January 7, 2021 00:12
A Polygon2D that can take a Shape2D.
tool
class_name ShapePolygon2D extends Polygon2D
func _get_configuration_warning() -> String:
if shape == null:
return "Shape resource is null"
if shape is ConvexPolygonShape2D and len(shape.points) <= 1:
return "ConvexPolygonShape2D has too few points to draw"
if shape is ConcavePolygonShape2D:
@thushan
thushan / windows-terminal-settings.json
Last active February 27, 2022 14:02
My Windows Terminal Settings profile with elevated prompt for PowerShell via gsudo.
// latest version is now here:
// https://github.com/thushan/dotfiles/blob/main/windows/windows-terminal/settings.json
@glsorre
glsorre / keychain.ps1
Last active May 23, 2022 05:23
Windows Subsystem for Linux: never prompt ssh passphrase again
$credentials = Get-StoredCredential -Target sshpassphrase
$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($credentials.Password)
$passphrase = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
C:\Windows\System32\wsl.exe -u [YOUR_WSL_USERNAME] -d [YOUR_DISTRIBUTION] /home/[YOUR_WSL_USERNAME]/wslu/keychain.sh $passphrase
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@WesThorburn
WesThorburn / 1.Instructions.md
Last active March 14, 2024 22:11
Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Download and Install Emscripten

  • My preferred installation location is /home/user
  • Get the latest sdk: git clone https://github.com/emscripten-core/emsdk.git
  • Enter the cloned directory: cd emsdk
  • Checkout main: git checkout main
  • Install the lastest sdk tools: ./emsdk install latest
  • Activate the latest sdk tools: ./emsdk activate latest
  • Activate path variables: source ./emsdk_env.sh
@noelbundick
noelbundick / LICENSE
Last active May 24, 2024 09:10
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@dentechy
dentechy / WSL-ssh-server.md
Last active June 13, 2024 15:17
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@siemanko
siemanko / tf_lstm.py
Last active July 26, 2023 06:57
Simple implementation of LSTM in Tensorflow in 50 lines (+ 130 lines of data generation and comments)
"""Short and sweet LSTM implementation in Tensorflow.
Motivation:
When Tensorflow was released, adding RNNs was a bit of a hack - it required
building separate graphs for every number of timesteps and was a bit obscure
to use. Since then TF devs added things like `dynamic_rnn`, `scan` and `map_fn`.
Currently the APIs are decent, but all the tutorials that I am aware of are not
making the best use of the new APIs.
Advantages of this implementation:
@Manouchehri
Manouchehri / rfc3161.txt
Last active June 24, 2024 14:01
List of free rfc3161 servers.
https://rfc3161.ai.moda
https://rfc3161.ai.moda/adobe
https://rfc3161.ai.moda/microsoft
https://rfc3161.ai.moda/apple
https://rfc3161.ai.moda/any
http://rfc3161.ai.moda
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com