Skip to content

Instantly share code, notes, and snippets.

@darcyparker
darcyparker / vimModeStateDiagram.svg
Last active March 26, 2024 09:37
Vim Modes Transition Diagram in SVG https://rawgithub.com/darcyparker/1886716/raw/eab57dfe784f016085251771d65a75a471ca22d4/vimModeStateDiagram.svg Note, most of the nodes in this graph have clickable hyperlinks to documentation.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@darcyparker
darcyparker / installNeovim.sh
Last active January 13, 2024 04:28
Build and install neovim for Debian
#!/usr/bin/env bash
#Build and install neovim for Debian
#See: https://neovim.io/
#See: https://github.com/neovim/neovim/wiki/Building-Neovim#quick-start
#See: https://gist.github.com/darcyparker/153124662b05c679c417
#Save current dir
pushd . > /dev/null || exit
@darcyparker
darcyparker / Resume_DarcyParker.md
Last active May 26, 2023 21:01
Resume: Darcy Parker
@darcyparker
darcyparker / getInfo.bat
Last active January 24, 2023 22:30
Windows Batch File to collect information about system, and files & dirs in current directory- useful for debugging issues- compare results using diff tool (like kdiff or vimdiff) between machines where issue occurs and does not occur. Note: Parts of batch file depends on md5sum.exe from http://gnuwin32.sourceforge.net/packages/coreutils.htm
@echo off
REM Windows Batch File to collect information about system, and files & dirs in current directory
REM - useful for debugging issues
REM - compare results using diff tool (like kdiff or vimdiff) between machines where issue occurs and does not occur
REM Written by Darcy Parker - darcyparker@gmail.com - 3/28/2013 and updated periodically since then.
REM - See https://gist.github.com/darcyparker/5264774 for updates.
REM Depends on md5sum.exe from http://gnuwin32.sourceforge.net/packages/coreutils.htm
setlocal
REM Get the current directory name
@darcyparker
darcyparker / jsctags.cmd
Last active May 10, 2021 18:31
Windows batch file to run jsctags
@echo off
REM Windows batch file to run jsctags
REM
REM Assumes node.exe is in your %PATH%.
REM git clone --recursive git://github.com/mozilla/doctorjs.git d:\opt\doctorjs
REM Note: Currently, the latest jsctags only works with older versions of node
REM To manage multiple versions of node on the same machine, use `n`.
REM `npm install -g n`
REM
REM Alternatively:
@darcyparker
darcyparker / set_jdk_JAVA_HOME.sh
Last active November 25, 2020 20:52
Set $JAVA_HOME to installed JDK.
if [ -x "$(command -v java)" ]; then
case "$(uname)" in
CYGWIN*)
#Assumes %JAVA_HOME% was set in Windows
#Convert $JAVA_HOME to unix-like path
JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
;;
Darwin*)
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
@darcyparker
darcyparker / pdfsearch.sh
Last active November 25, 2020 20:05
Search PDFs from command line
#!/usr/bin/env bash
#Search pdfs: a wrapper for pdfgrep and pdftotext
#http://github.com/darcyparker
_usage(){
local _filename=${0##*/}
cat << END_USAGE
Usage: $_filename
Search current directory:
$_filename <search pattern>
@darcyparker
darcyparker / installAcer720CTouchPadDriver.sh
Last active March 20, 2020 01:08
Install ChromiumOS touchpad driver for linux chroot (crouton) on Acer C720C chromebook. This makes the touchpad behave and respond like it does in ChromeOS.
#!/usr/bin/env bash
#Install ChromiumOS touchpad driver for linux chroot (crouton) on Acer C720P (Peppy) Chromebook.
#This makes the touchpad behave and respond like it does in ChromeOS.
#See: https://github.com/hugegreenbug/xf86-input-cmt/issues/6
#I posted a note about this script in: https://groups.google.com/forum/#!topic/crouton-central/claM9XZxsz0
#and https://github.com/dnschneid/crouton/wiki/Acer-C720-C720P#touchpad
#After creating/installing this driver, look at:
#https://github.com/hugegreenbug/xf86-input-cmt#notes
@darcyparker
darcyparker / vim64Bit_CompiledWithMSVC.md
Created May 14, 2013 21:49
Compiling 64 bit Vim using free MS Visual Studio 2012 Express

#Compiling 64 bit Vim using free MS Visual Studio 2012 Express

I needed vim with Python support on Win7. The following are my notes.

##Background on why At first this sounds simple... but challenges included:

@darcyparker
darcyparker / gitgrepall
Last active June 6, 2018 17:47
git grep for a git repo and its submodules
#!/usr/bin/env bash
# Author: darcyparker@gmail.com
# Repo: https://gist.github.com/darcyparker/d5b9168ada88d0527564a11d9d9899c4
# Description:
# * git grep for the repo and its submodules.
# * greps into submodules recrusively
# * Output includes full relative path from the top level repo to files with matches
# * Output is formatted with line number, and column number of matched
# Usage:
# gitgrep "some string"