Skip to content

Instantly share code, notes, and snippets.

View digitaljhelms's full-sized avatar

Jeremy Helms digitaljhelms

  • USA
View GitHub Profile
@digitaljhelms
digitaljhelms / linkroll.md
Last active February 26, 2022 23:32
Interesting and/or useful dev links
  • How one developer just broke Node, Babel and thousands of projects in 11 lines of JavaScript – Link
    • The npm Blog – kik, left-pad, and npm – Link
  • Electron – Build cross platform desktop apps with web technologies – Link
  • What every Browser knows about you – Link
  • Android Studio 2.0 | Android Developers Blog – Link
  • Dev Centers – Directory of developer center websites with memorable URL shortcuts – Link
  • Java Forever And Ever Movie (Java vs Windows .Net) – Link
  • Everything announced at Facebook's F8 conference – Link
  • New Facebook dev tools include Account Kit, push and quote sharin
@digitaljhelms
digitaljhelms / gist:2931522
Created June 14, 2012 17:07
Building and installing Git from source on OS X Lion

Building and installing Git from source on OS X Lion

This outline for building and installing Git has only been tested against Mac OS X 10.7.x (Lion). While these steps may work for previous versions of Mac OS X, I cannot confirm this. Furthermore, you're on your own, if you screw something up, it's not my fault.

If you have Xcode 4, you have Git!

Xcode 4 includes the Git binary at the application level so it's available to itself (located at /Applications/Xcode.app/Contents/Developer/usr/bin/git). Additionally, Xcode 4 includes a new "Downloads" preference pane to install optional components, one of which are the Command Line Tools (similar to the Dev Tools package that shipped with older versions of Xcode) and once installed, Git (and many other utilities, such as make) is installed at the system level (located at /usr/bin).

*Note: You don't have to install Xcode to use the Command Line Tools; it can be downloaded independently from the Apple Developer site (you need to login, but it's free

@digitaljhelms
digitaljhelms / color
Created June 17, 2021 02:26
Include files for bash scripts
#!/bin/bash
# check if stdout is a terminal
if [ -t 1 ]; then
# see if it supports colors
ncolors=$(tput colors)
if [[ -n "$ncolors" && $ncolors -ge 8 ]]; then
bold="$(tput bold)"
underline="$(tput smul)"
@digitaljhelms
digitaljhelms / gist:5247192
Last active September 17, 2020 11:01
A faster, less buggy alternative to "python -m SimpleHTTPServer"
$ npm install -g http-server
$ http-server -p 8000 -a foo.bar.com

Would serve PWD at http://foo.bar.com/

@digitaljhelms
digitaljhelms / api.json
Created July 13, 2012 23:44
A JSON formatted response containing all posts from a Jekyll blog
[
{
"homepage": "http://digitaljhelms.github.com",
"name": "digitaljhelms",
"description": "finally blogging...",
"author": "Jeremy Helms",
"post": {
"url": "http://digitaljhelms.github.com/howto/creating-a-branch-with-no-parents-or-history",
"slug": "creating-a-branch-with-no-parents-or-history",
"title": "Create a Git Branch without Parents or History",
@digitaljhelms
digitaljhelms / httpcode
Last active August 27, 2019 04:34
CLI to evaluate the HTTP Code for a list of URLs
#!/bin/bash
while IFS= read -r LINE || [ "$LINE" ]; do
# https://curl.haxx.se/docs/manpage.html
IN=$(curl -o /dev/null --silent --head --write-out "%{http_code};%{redirect_url}" "$LINE")
# https://stackoverflow.com/a/5257398
arrIN=(${IN//;/ })
if [ "${arrIN[0]}" = "301" ] || [ "${arrIN[0]}" = "302" ]; then
@digitaljhelms
digitaljhelms / DNSimpleUpdater
Last active July 15, 2018 17:37
DNSimple DNS Updater for OS X Yosemite
#!/bin/bash
AUTH_EMAIL='your@email' # dnsimple account email address
AUTH_TOKEN='your-api-token' # dnsimple api token
DOMAIN_ID='yourdomain.com' # domain name or id
RECORD_ID='12345' # record id to update
IP="`curl http://icanhazip.com/`"
curl -H "X-DNSimple-Token: $AUTH_EMAIL:$AUTH_TOKEN" \
-H "Accept: application/json" \
@digitaljhelms
digitaljhelms / README.md
Last active March 13, 2018 04:49
Instructions on adding the AEM error log to the Console application Reports

Using a symlink to easily view the AEM log on macOS +10.12 in the Console application (without having to manually find/open the log file) won’t work anymore, it requires a hard link:

brew install hardlink-osx
mkdir ~/Library/Logs/AEM
hln <PROJECT ROOT>/AEM/author/crx-quickstart/logs/error.log ~/Library/Logs/AEM/<PROJECT NAME>.error.log
open -a Console.app

Anytime you want to view the log, it’s at Reports → ~/Library/Logs → AEM → .error.log

@digitaljhelms
digitaljhelms / keybase.md
Last active December 12, 2017 05:09
Keybase proof

Keybase proof

I hereby claim:

  • I am digitaljhelms on github.
  • I am digitaljhelms (https://keybase.io/digitaljhelms) on keybase.
  • I have a public key whose fingerprint is F930 EA2C 5B7B FB40 CE37 5C87 998D 75C9 EE6C 2676

To claim this, I am signing this object:

@digitaljhelms
digitaljhelms / gist:3014302
Created June 28, 2012 22:08
Sublime Text 2 bash alias & CLI function to open projects without using the `.sublime-project` file extension
# bash alias
alias subl='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'
# bash function, usage: $ st -p [projectname] -opt2 -opt3
function st() {
if [ -n "$1" -a -n "$2" ]; then # if more than one argument
if [ "$1" = "-p" -o "$1" = "--project" ]; then # if arg1 is -p or --project
local projectfile="$2"
[[ $projectfile != *.sublime-project ]] && projectfile="$2.sublime-project" # detect if arg2 already includes the ext
if [ -e $projectfile ]; then # does project file exist?