Skip to content

Instantly share code, notes, and snippets.

View ryanmoralesaz's full-sized avatar

Ryan Morales ryanmoralesaz

View GitHub Profile
@ryanmoralesaz
ryanmoralesaz / chat2md.js
Created July 9, 2024 18:06
Code to export ChatGPT to markdown in the browser console via Matija Zaberna on Medium
function h(html) {
return html.replace(/<p>/g, '\n\n')
.replace(/<\/p>/g, '')
.replace(/<b>/g, '**')
.replace(/<\/b>/g, '**')
.replace(/<i>/g, '_')
.replace(/<\/i>/g, '_')
.replace(/<code[^>]*>/g, (match) => {
const lm = match.match(/class="[^"]*language-([^"]*)"/);
return lm ? '\n```' + lm[1] + '\n' : '```';
@ryanmoralesaz
ryanmoralesaz / expandchat.js
Created July 9, 2024 18:08
Code to widen the chat gpt output window paste into browser console
var style = document.createElement('style');
style.innerHTML = '.text-base { max-width: 100% !important; padding-left: 20px !important; padding-right: 20px !important; }';
document.head.appendChild(style);
@ryanmoralesaz
ryanmoralesaz / .gitconfig
Last active October 24, 2025 05:05
git config
[user]
name = git
email = your_preferred@email.email
[alias]
ac = "!git add . && git commit -m"
pom = push origin main
lom = pull origin main
rao = remote add origin
lomauh = pull origin main --allow-unrelated-histories
#Requires AutoHotkey v2.0
#SingleInstance Force
#Warn ; Enable warnings to assist with detecting common errors
; ======= NOTES ABOUT SCRIPT ===========
; This script has the following features
; Programmer Ryvak keyboard features
; center mouse with middle mouse button or ctrl+alt+m
; numpad navigation when num lock off
@ryanmoralesaz
ryanmoralesaz / all special characters
Created November 11, 2024 01:45
Special character practice
function () {} class { constructor () {} } console.log(`${this.id}`); if obj.item != null item++ else { item-- } file-name.txt is < __proto__.method line; "quote 'inside'" path/your_file/ is? not? 2^5 == 4*4*3^5 if !== null && is valid || path\file_name\ -Recurse function () {} class { constructor () {} } console.log(`${this.id}`); if (obj.item != null) { item++; } else { item--; } file-name.txt is < __proto__.method line; "quote 'inside'" path/your_file/ is? not? 2^5 == 4*4*3^5 if (!== null) #prvate int mod 5 % 2 = 3 % 5 child ~ element {} nth-ofType ~ sibling function () {} class { constructor () {} } console.log(`${this.id}`); if obj.item != null item++ else { item-- } file-name.txt is < __proto__.method line; "quote 'inside'" path/your_file/ is? not? 2^5 == 4*4*3^5 if !== null && is valid || path\file_name\ -Recurse function () {} class { constructor () {} } console.log(`${this.id}`); if (obj.item != null) { item++; } else { item--; } file-name.txt is < __proto__.method line; "quote 'inside'" path/your_
@ryanmoralesaz
ryanmoralesaz / keybindings.json
Created November 11, 2024 01:53
vs code keybindings
[
{
"_comment": "enable/disable VIM",
"key": "alt+m",
"command": "toggleVim",
"when": "editorTextFocus"
},
{
"_comment": "works in windows, does it work in mac?",
"key": "alt+t",
@ryanmoralesaz
ryanmoralesaz / info.txt
Created November 11, 2024 02:32
How to install vim with vimrc
Here's how to install vim-plug in Git Bash:
First, create the autoload directory:
bashCopymkdir -p ~/.vim/autoload
Then download the plug.vim file:
bashCopycurl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
@ryanmoralesaz
ryanmoralesaz / ryvak-win-kinesis.ahk
Created December 23, 2024 01:22
ahk-script-for-ryvak-windows-kinesis-with-9-8-numberswap
#Requires AutoHotkey v2.0
#SingleInstance Force
#Warn ; Enable warnings to assist with detecting common errors
; ======= NOTES ABOUT SCRIPT ===========
; This script has the following features
; Programmer Ryvak keyboard features
; ctrl+alt+m
; numpad navigation when num lock off ; reversed numpad for 123 on top row
@ryanmoralesaz
ryanmoralesaz / ryvak.xkb
Last active December 28, 2024 04:36
XKB Ryvak
default partial alphanumeric_keys
xkb_symbols "basic" {
name[Group1]= "Ryvak";
// Add the backtick/tilde key
key <TLDE> { [ grave, asciitilde ] }; // backtick/tilde key
// Numbers row - Using keycodes 10-21
key <AE01> { [ ampersand, 9 ] }; // keycode 10 (1 key)
key <AE02> { [ bracketleft, 7 ] }; // keycode 11 (2 key)
@ryanmoralesaz
ryanmoralesaz / evdev.xml
Created December 28, 2024 03:14
ryvak evdev xml
<layout>
<configItem>
<name>ryvak</name>
<shortDescription>ry</shortDescription>
<description>Ryvak</description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
</configItem>
</layout>