Skip to content

Instantly share code, notes, and snippets.

@qtkite
qtkite / keybindings.json
Last active June 4, 2023 12:01
Disable annoying shift + enter in vscode when writing python (not jupyter notebooks) (only tested on macOS)
[
{
"key": "shift+enter",
"command": "-workbench.action.terminal.sendSequence",
"when": "terminalFocus && terminalShellIntegrationEnabled && !accessibilityModeEnabled && terminalShellType == 'pwsh'",
"args": {"text":"\u001b[24~c"}
},
{
"key": "shift+enter",
"command": "-python.execSelectionInTerminal",
@qtkite
qtkite / anki.py
Last active June 4, 2023 12:34
minimal anki generator (basic deck)
file_headers = '#separator:tab\n#html:true\n'
separator = '\t'
class AnkiDeck:
def __init__(self) -> None:
self.deck = []
def add_card(self, front: str, back: str) -> None:
self.deck.append([front, back])
# Disabling Hyper-V
- bcdedit /set hypervisorlaunchtype off
- reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Enabled" /t REG_DWORD /d 0 /f
# Enabling Hyper-V
- bcdedit /set hypervisorlaunchtype auto
- reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Enabled" /t REG_DWORD /d 1 /f
@qtkite
qtkite / .bashrc
Last active August 7, 2021 01:40
alias ls='ls --color'
export PS1='\u@\h:\[\e[33m\]\w\[\e[0m\]\$ '
#export PS1="TheNameYouWant\[\e[31m\] \[\e[m\]\[\e[31m\]:\[\e[m\]\[\e[31m\]:\[\e[m\] \[\e[32m\]\w\[\e[m\] \[\e[34m\]»\[\e[m\] "
export EDITOR='vim'
export CLICOLOR=1
export LSCOLORS=cxgxfxexbxegedabagacad
LS_COLORS=$LS_COLORS:'ow=1;34:' ; export LS_COLORS
@qtkite
qtkite / dark-default.minttyrc
Created August 3, 2021 15:57
Mintty color scheme
BackgroundColour=21,21,21
ForegroundColour=208,208,208
CursorColour=208,208,208
Black=21,21,21
BoldBlack=80,80,80
Red=172,65,66
BoldRed=172,65,66
Green=144,169,89
BoldGreen=144,169,89
Yellow=244,191,117
@qtkite
qtkite / .tmux.conf
Last active August 26, 2021 16:18
tmux settings
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour137
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g mode-keys vi
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
@qtkite
qtkite / .vimrc
Last active August 22, 2022 14:47
updated .vimrc settings for wsl windows
syntax on
let g:python_recommended_style = 0
filetype plugin indent on
" Disable sounds
set visualbell
" https://github.com/geohot/configuration/blob/master/.vimrc
set tabstop=2
@qtkite
qtkite / init.vim
Last active August 24, 2021 05:27
nvim settings
syntax on
filetype plugin indent on
" Disable sounds
set visualbell
" https://github.com/geohot/configuration/blob/master/.vimrc
set tabstop=2
set shiftwidth=2
set expandtab
@qtkite
qtkite / syscalls.cpp
Last active August 27, 2022 08:37
calling x64 bit syscall with their ordinals
// make syscalls from their ordinals
#include <Windows.h>
#include <stdio.h>
#include <cstdint>
#include <vector>
struct syscall_bytes {
uint8_t
header[0x4] ,
@qtkite
qtkite / flagsys.vb
Last active July 3, 2019 03:06
FlagSys is a simple class you can integrate into any VB.NET project to make use of flags using bitwise operators.
' Just a small class I wrote that allows simple integration of the use of flags
''' <summary>
''' Flag sys is a class for any program that allows integration of a flag based system
''' </summary>
Public Class FlagSys
Dim iFlag As Integer = 0
''' <summary>
''' Constructor that automatically assigns a flag if a value is passed