- 34 Nelson Drive, Dedham, MA 02026
- Phone: 781-696-0594
- Email: [email protected]
- LinkedIn: https://www.linkedin.com/in/darcykennethparker
- Github: https://github.com/darcyparker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Author: [email protected] | |
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM https://gist.github.com/darcyparker/7121448 | |
REM Searches for latest JDK and sets JAVA_HOME | |
REM Look up current version | |
for /f "usebackq tokens=2*" %%i in (`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit" /s ^| "%WINDIR%\system32\find.exe" "CurrentVersion"`) do set _jdkcurrentver=%%j | |
REM Look up JavaHome for current version | |
for /f "usebackq tokens=2*" %%i in (`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\%_jdkcurrentver%" /s ^| "%WINDIR%\system32\find.exe" "JavaHome"`) do set JAVA_HOME=%%j | |
echo JAVA_HOME=%JAVA_HOME% | |
set _jdkcurrentver= | |
setx JAVA_HOME "%JAVA_HOME%" |
#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:
- Vim has numerous download options, but none were quite right.
- gvim73_46.exe is old and doesn't have all the features I want
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM Using %~dp0 is common in batch files to identify the root folder of the batch file | |
REM But sometimes %~dp0 does not work as expected. | |
REM | |
REM This batch file illustrates where %~dp0 fails to return desired root folder where this | |
REM batch file is located. | |
REM | |
REM To setup the demonstration: | |
REM - save this batch file to a location such as d:\bin\GetThisCommandsDir | |
REM - Go to a different folder to execute the test cases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 - [email protected] - 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 |
NewerOlder