Skip to content

Instantly share code, notes, and snippets.

View spartanatreyu's full-sized avatar
💭
The spice must flow and the stack must overflow

Jayden Pearse spartanatreyu

💭
The spice must flow and the stack must overflow
View GitHub Profile
@spartanatreyu
spartanatreyu / spartanatreyu.omp.toml
Created October 15, 2024 07:00
Personal Oh-My-Posh Theme
"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json"
version = 2
final_space = true
console_title_template = "{{ .Folder }}"
auto_upgrade = true
[[blocks]]
type = "prompt"
alignment = "left"
@spartanatreyu
spartanatreyu / personal keyboard qmk firmware.txt
Last active May 24, 2024 06:43
Personal Keyboard + QMK firmware
Description: COLMAK-DH with programmer friendly shortcuts and QWERTY fallback layer
Keyboard (split + ortholinear): https://www.zsa.io/moonlander
QMK Firmware: https://configure.zsa.io/moonlander/layouts/Mvngb/latest/0
Printable cheatsheet: https://codepen.io/spartanatreyu/pen/XWBeyRd
Switches: Gazzew Boba U4 Silent Tactile (Clear)
@spartanatreyu
spartanatreyu / .wezterm.lua
Last active August 21, 2024 06:08
Personal terminal config (wezterm)
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
-----------------------------------------
-- Terminal Controls --
-----------------------------------------
-- Mac/Emacs style Cursor jumping
local action = wezterm.action
config.keys = {
@spartanatreyu
spartanatreyu / file.ts
Last active May 12, 2023 09:12
An example of using Capacitor v3's file APIs. This is using @capacitor/core: 3.0.1, and @capacitor/filesystem: 1.0.1.
import { Capacitor } from '@capacitor/core';
import { Filesystem, Directory, Encoding, WriteFileResult } from '@capacitor/filesystem';
// Basic file I/O functions
export const writeFile = async (path: string = 'secrets/text.txt', dataToWrite: string = 'hello world', isBinary: boolean = true) => {
return Filesystem.writeFile({
path: path,
data: dataToWrite,
directory: Directory.Data,
@spartanatreyu
spartanatreyu / typescript.json
Last active July 14, 2021 03:19
Personal vscode snippet for ts
{
// Place your snippets for typescript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@spartanatreyu
spartanatreyu / javascript.json
Last active July 14, 2021 03:19
Personal vscode snippet for js
{
// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@spartanatreyu
spartanatreyu / karabiner.json
Last active May 24, 2024 06:20
Personal MacOS keyboard firmware override, Karabiner-elements config to set Caps+IJKL to arrows
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"jaydens_disabled_rules_to_be_experimented_with_later": [
@spartanatreyu
spartanatreyu / keybindings.json
Last active July 21, 2023 02:28
Personal vscode keybindings
// Place your key bindings in this file to overwrite the defaults
[
// Close window if trying to close a tab and there are not tabs left to close
{
"key": "cmd+w",
"command": "workbench.action.closeWindow",
"when": "!editorIsOpen && !multipleEditorGroups"
},
// Overwrite default tab switching shortcuts:
{
@spartanatreyu
spartanatreyu / settings.json
Last active November 29, 2023 07:04
Personal vscode settings.json
{
// Theme customisation
"workbench.colorTheme": "Monokai",
"editor.showFoldingControls": "always",
"editor.cursorSurroundingLines": 5,
"editor.renderControlCharacters": true,
"editor.renderWhitespace": "all", //if you want it, check how it looks with rainbow-indent
"trailing-spaces.includeEmptyLines": false,
"trailing-spaces.highlightCurrentLine": false,
// "editor.guides.bracketPairs": "active", // Is only worth setting to true when files use one open bracket per indentation level
@spartanatreyu
spartanatreyu / init.lua
Last active August 13, 2024 16:31
Personal Window Management script (hammerspoon)
--Hammerspoon config to replace Cinch & Size-up (Microsoft Windows style) window management for free
--Windows Vista/7's Areo Snap on MacOS
--By Jayden Pearse (spartanatreyu)
-------------------------------------------------------------------
--Options, feel free to edit these:
-------------------------------------------------------------------
--Set this to true to snap windows by dragging them to the edge of your screen
enable_window_snapping_with_mouse = true