Skip to content

Instantly share code, notes, and snippets.

View vitran96's full-sized avatar

Chris vitran96

View GitHub Profile
@webmaster128
webmaster128 / CMakeLists.txt
Created December 26, 2015 14:17
Single cmake config for Botan
project(Botan)
cmake_minimum_required(VERSION 2.8)
# Configure for use with CMake
#
# ./configure.py --with-bzip2 --with-zlib --with-lzma --enable-modules="dyn_load"
#
macro(use_cxx11)
if (CMAKE_VERSION VERSION_LESS "3.1")
@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
@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:
@WesThorburn
WesThorburn / 1.Instructions.md
Last active July 29, 2025 13:21
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
@siemanko
siemanko / tf_lstm.py
Last active November 22, 2025 10:34
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:
@SunnyRaj
SunnyRaj / configure_muliple_gcc.sh
Last active January 7, 2026 00:44
Configure multiple GCC versions on ubuntu
#!/usr/bin/env bash
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo apt-get install -y gcc-4.8 g++-4.8 gcc-4.9 g++-4.9 gcc-5 g++-5 gcc-6 g++-6 gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
" 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'
@fomightez
fomightez / remove blank lines regex.md
Last active May 1, 2026 22:22
remove all blank lines using regular expressions