Skip to content

Instantly share code, notes, and snippets.

View BebeSparkelSparkel's full-sized avatar

William Rusnack BebeSparkelSparkel

View GitHub Profile
@BebeSparkelSparkel
BebeSparkelSparkel / vim-recovery-diff
Created October 28, 2024 17:50
Show the diff of the current file and the recovered file
#!/bin/sh
file="$1"
# Check if file exists
if [ ! -f "$file" ]; then
echo "Error: File '$file' not found" >&2
exit 1
fi
# Change to directory containing the file
@BebeSparkelSparkel
BebeSparkelSparkel / xclip-clipboard
Created October 2, 2024 15:12
`xclip-clipboard` a sh wrapper for xclip that defaults the selection to XA_CLIPBOARD instead of XA_PRIMARY
#!/bin/sh
for arg in "$@"
do
if [ "$arg" = "-selection" ]
then
echo "Error: -selection argument is not allowed in this xclip wrapper. Use xclip directly instead." >&2
exit 1
elif [ "$arg" = "-h" -o "$arg" = "-help" ]
then
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2017,
},
@BebeSparkelSparkel
BebeSparkelSparkel / tslint.json
Created November 15, 2017 01:32
tslint config with my rules
{
"defaultSeverity": "error",
"extends": [
"tslint:recommended"
],
"jsRules": {},
"rules": {
"semicolon": [true, "never"],
"quotemark": [true, "single"],
"only-arrow-functions": false,