Skip to content

Instantly share code, notes, and snippets.

% To remove a Matlab trailing whitespace in the editor
% Original Author: Sam Roberts
% Improved by: Simone Gaiarin <[email protected]>
% http://stackoverflow.com/questions/19770347/how-to-auto-remove-trailing-whitespaces-on-save-in-matlab
% Modified by Mark Harfouche to remember cursor location
%
%
% Temp variable for shortcut. Give it an unusual name so it's unlikely to
% conflict with anything in the workspace.
shtcutwh__ = struct;
api.map('J', 'E'); // previous tab
api.map('K', 'R'); // next tab
api.iunmap(":");
// api.Hints.setCharacters('yuiopnm'); // for right hand
api.Hints.setCharacters('yuiopnmasdfgqwertzxcvb'); // pioritize right hand
@simgunz
simgunz / cloudSettings
Last active July 21, 2021 11:37
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-07-21T11:37:51.022Z","extensionVersion":"v3.4.3"}
@simgunz
simgunz / launch.json
Last active February 17, 2020 12:53
VSCode launch.json to debug anki
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Anki",
"type": "python",
"request": "launch",
@simgunz
simgunz / settings.json
Last active February 16, 2020 18:20
VSCode settings for developing Anki addons
{
"python.pythonPath": ".pyenv/bin/python3",
"python.autoComplete.extraPaths": [
"${workspaceFolder}/anki/anki",
]
}
@simgunz
simgunz / gist:893cfe99971e2813e01655db82cc837d
Created November 26, 2023 18:35
'al' function to list aliases in a menu
#!/bin/zsh
##? al - list my aliases
function al() {
local zalias_file="$HOME/.zsh/zalias"
local IFS=$'\n' # Change the field separator to newline
local categories=() # Array to store categories
local formatted_aliases=() # Array to store formatted alias strings
local selected_category=""
local choice