Skip to content

Instantly share code, notes, and snippets.

View keyle's full-sized avatar
👾

keyle

👾
View GitHub Profile
/**
* MacEditorTextView
* Copyright (c) Thiago Holanda 2020-2021
* https://gist.github.com/unnamedd/6e8c3fbc806b8deb60fa65d6b9affab0
* MIT license
*/
import SwiftUI
import Neon
@keyle
keyle / backup.sh
Created September 2, 2023 03:30
linux server backup script
#!/bin/bash
####################################
# Backup to tar
# inspired from
# https://ubuntu.com/server/docs/basic-backup-shell-script
####################################
# What to backup.
backup_files="/home /var/spool/mail /etc /root /opt"
@keyle
keyle / launch.json
Created June 1, 2023 09:05
Cargo debug launch.json macOS (needs CodeLLDB & rust-analyzer extensions)
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"program": "${workspaceFolder}/target/debug/<!!!your-binary-name!!!>",
"preLaunchTask": "rust: cargo build",
"args": [],
@keyle
keyle / launch.json
Last active May 25, 2023 11:19
Rust launch.json for VSCode macOS with LLDB (M1) using rust-analyzer
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch & Debug",
"type": "lldb",
"request": "launch",
"program": "${workspaceRoot}/target/debug/${workspaceRootFolderName}",
"args": [],
"cwd": "${workspaceRoot}"
@keyle
keyle / README.md
Last active May 24, 2023 09:38
M1/M2 C Debugging with Clang, CodeLLDB and VSCode
@keyle
keyle / launch.json
Created May 9, 2023 04:05
launch.json for PHP XDEBUG
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"stopOnEntry": false, // !!! doesn't work, hit the refresh (Green) icon and keep going
"port": 9000,
"pathMappings": {
@keyle
keyle / .clang-format
Last active April 22, 2023 05:00
.clang-format laptop
BasedOnStyle: Google
IndentWidth: 4
UseTab: false
AlignTrailingComments: true
SpacesBeforeTrailingComments: 1
KeepEmptyLinesAtTheStartOfBlocks: false
AllowShortBlocksOnASingleLine: true
AllowShortIfStatementsOnASingleLine: true
@keyle
keyle / bindings.json
Last active November 8, 2023 10:20
micro settings
{
"Alt-/": "lua:comment.comment",
"Alt-Left": "StartOfLine",
"Alt-MouseLeft": "MouseMultiCursor",
"Alt-Right": "EndOfLine",
"Alt-[": "PreviousTab",
"Alt-]": "NextTab",
"Alt-d": "command:definition",
"Alt-f": "command:format",
"Alt-k": "command:hover",
@keyle
keyle / safari-style-sheet.css
Created December 6, 2021 00:54
safari-style-sheet.css
/* NOTE: min font-size 17 (on 27" 5K screen...) */
html > body, font, p, table tr td {
line-height: 1.6 !important;
}
@keyle
keyle / Preferences-Profile-Advanced.md
Created December 5, 2021 12:47
Semantic history cmd+click editor in iTerm2

Semantic history, cmd+click iTerm2

this will open your editor of choice on cmd+click of a path in iTerm (from a list of paths, search, grep, rg, fd...)

Semantic History

pick

run coprocess -&gt; echo micro \1