Skip to content

Instantly share code, notes, and snippets.

Darcy Parker darcyparker

Block or report user

Report or block darcyparker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@darcyparker
darcyparker / gitgrepall
Last active Jun 6, 2018
git grep for a git repo and its submodules
View gitgrepall
#!/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"
View Resume_DarcyParker.md

#Darcy Parker

##Summary

Passionate and accomplished Principal Product Manager at $1B+ company who has successfully led new product development from concept to market while managing operational constraints such as scope, resources, schedule and budget.

@darcyparker
darcyparker / installAcer720CTouchPadDriver.sh
Last active Mar 26, 2019
Install ChromiumOS touchpad driver for linux chroot (crouton) on Acer C720C chromebook. This makes the touchpad behave and respond like it does in ChromeOS.
View installAcer720CTouchPadDriver.sh
#!/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 / installNeovim.sh
Last active Feb 4, 2019
Build and install neovim for Debian
View installNeovim.sh
#!/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
#Save current dir
pushd .
#Install dependencies
@darcyparker
darcyparker / pdfsearch.sh
Last active Aug 14, 2019
Search PDFs from command line
View pdfsearch.sh
#!/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 / set_jdk_JAVA_HOME.sh
Last active Aug 15, 2019
Set $JAVA_HOME to installed JDK.
View set_jdk_JAVA_HOME.sh
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 / set_jdk_JAVA_HOME.bat
Last active Feb 29, 2016
Searches for latest JDK installed and sets %JAVA_HOME% to it. Useful for tools like ant which expect %JAVA_HOME% to be set to a JDK. This saves me time in having to reset %JAVA_HOME% after I update my JDK install.
View set_jdk_JAVA_HOME.bat
@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%"
@darcyparker
darcyparker / vim64Bit_CompiledWithMSVC.md
Created May 14, 2013
Compiling 64 bit Vim using free MS Visual Studio 2012 Express
View vim64Bit_CompiledWithMSVC.md

#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 / GetThisCommandsDir.bat
Created Mar 28, 2013
Tools written in a scripting language like node.js, ruby, python, etc... often wrap the script in a batch file that uses %~dp0 to identify the root folder of the command being called. In most scenarios %~dp0 gives the expected result. But sometimes they give the wrong result and cause the tool/script to fail. For example, some applications (such…
View GetThisCommandsDir.bat
@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
@darcyparker
darcyparker / getInfo.bat
Last active May 2, 2019
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
View getInfo.bat
@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
You can’t perform that action at this time.