Skip to content

Instantly share code, notes, and snippets.

View kevinjalbert's full-sized avatar

Kevin Jalbert kevinjalbert

View GitHub Profile
@kevinjalbert
kevinjalbert / enhanced-vim-searching.md
Last active September 1, 2017 15:49
Enhanced Vim Searching

Enhanced Vim Searching

Basic Searching

Vim provides rather simple searching capabilities using the following keys while in normal mode:

  • / performs a forward search of the provided pattern
  • ? performs a backward search of the provided pattern
  • * performs a forward search of the word under the cursor
  • # performs a backward search of the word under the cursor
@kevinjalbert
kevinjalbert / keybase.md
Created April 26, 2016 00:40
Proof Keybase.io

Keybase proof

I hereby claim:

  • I am kevinjalbert on github.
  • I am kevinjalbert (https://keybase.io/kevinjalbert) on keybase.
  • I have a public key ASBaI00PzCjfm33W097j1OlZBBHZahbLTV3TXXSnFT7Jsgo

To claim this, I am signing this object:

@kevinjalbert
kevinjalbert / bluetooth_headphones.scpt
Last active June 27, 2020 02:49
AppleScript to connect bluetooth headphones and show its battery level
activate application "SystemUIServer"
set deviceName to "Kevin Jalbert's BeatsX"
tell application "System Events"
tell process "SystemUIServer"
set bluetoothMenu to (menu bar item 1 of menu bar 1 whose description contains "bluetooth")
tell bluetoothMenu
click
set deviceMenuItem to (menu item deviceName of menu 1)
@kevinjalbert
kevinjalbert / Coronavirus.js
Last active August 17, 2021 15:04 — forked from planecore/Coronavirus.js
Coronavirus Scriptable Widget (For Canadian Provinces)
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-green; icon-glyph: user-md;
// heavily inspired by https://gist.github.com/planecore/e7b4c1e5db2dd28b1a023860e831355e
const province = "ON" // change this to your province
const url = "https://api.covid19tracker.ca/summary/split"
const req = new Request(url)
const res = await req.loadJSON()
@kevinjalbert
kevinjalbert / mirror.scpt
Last active March 30, 2025 21:44
AppleScript to Mirror iPhone to QuickTime
set deviceName to "Kevin’s iPhone"
activateScreenKeepAwake()
readyQuickTime()
setVideoInput(deviceName)
setAudioInput(deviceName)
setVolume(1.0)
setScreenSize("maximize")
# ----- Functions -----
@kevinjalbert
kevinjalbert / import-raindrop-highlights-into-readwise.rb
Last active February 28, 2025 22:51
Import Raindrop.io Highlights into Readwise
#!/usr/bin/env ruby
require "httparty"
require "nokogiri"
require "open-uri"
require "uri"
RAINDROP_AUTH_TOKEN="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
READWISE_AUTH_TOKEN="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
LAST_SAVED_HIGHLIGHT=000000000 # <- Keeps track of import position (Updates automatically)
@kevinjalbert
kevinjalbert / LICENSE
Last active July 29, 2025 18:54
Git Dig (find deleted files whose content matches a regex)
MIT License
Copyright (c) 2025 Kevin Jalbert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@kevinjalbert
kevinjalbert / git-bisect-branch.sh
Last active September 1, 2022 03:34
Git Bisect: Only the Current Branch
#!/usr/bin/env bash
while getopts 'b:dh' OPTION; do
case "$OPTION" in
b)
divergent_branch=$OPTARG
;;
d)
debug=true
;;
h)