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 / 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 May 28, 2024 05:54
Personal terminal config (wezterm)
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
-- Mac-style Cursor jumping
local action = wezterm.action
config.keys = {
{ mods = "OPT", key = "LeftArrow", action = action.SendKey({ mods = "ALT", key = "b" }) },
{ mods = "OPT", key = "RightArrow", action = action.SendKey({ mods = "ALT", key = "f" }) },
{ mods = "CMD", key = "LeftArrow", action = action.SendKey({ mods = "CTRL", key = "a" }) },
{ mods = "CMD", key = "RightArrow", action = action.SendKey({ mods = "CTRL", key = "e" }) },
@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 May 27, 2024 06:23
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
/* jshint devel: true */
/* global angular */
'use strict';
/*
Requres: https://github.com/dawsonloudon/VideoPlayer
Usage: <videoplayer src="videofile"></videoplayer>
Don't put ".mp4" or ".webm" in the src atr above
*/