Skip to content

Instantly share code, notes, and snippets.

@dgpokl
dgpokl / dgp.zsh-theme
Last active March 3, 2022 00:50
dgp's simple zsh theme
PROMPT='%~ $ '
RPROMPT='$(git_prompt_info)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$bg[white]%}%{$fg[red]%} "
ZSH_THEME_GIT_PROMPT_SUFFIX=" %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" *"
ZSH_THEME_GIT_PROMPT_CLEAN=""
@dgpokl
dgpokl / failing one.js
Created October 28, 2021 00:06
Builder requests
fetch("https://cdn.builder.io/api/v1/query/aa96744e7fe74e2a90d22918299c1f1d/50825ca79c37469682a4cc3866e7ff2a?omit=meta.componentsUsed&apiKey=aa96744e7fe74e2a90d22918299c1f1d&userAttributes.urlPath=%2Fcollections%2Fwomens-jackets&userAttributes.host=www.aloyoga.com&userAttributes.device=desktop&options.50825ca79c37469682a4cc3866e7ff2a.prerender=true&options.50825ca79c37469682a4cc3866e7ff2a.model=%22collection-dropzone%22&options.50825ca79c37469682a4cc3866e7ff2a.entry=%2250825ca79c37469682a4cc3866e7ff2a%22", {
"headers": {
"sec-ch-ua": "\"Chromium\";v=\"94\", \"Microsoft Edge\";v=\"94\", \";Not A Brand\";v=\"99\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\""
},
"referrer": "https://www.aloyoga.com/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": null,
"method": "GET",
@dgpokl
dgpokl / upgrade_jenkins.sh
Created March 27, 2018 22:51
Bitnami jenkins unattended update script
#!/bin/bash
if [[ `whoami` != 'root' ]] ; then
echo "Must run this as root"
exit 59
fi
NEW_JENKINS="$1"
if [[ "$NEW_JENKINS" = "" ]] ; then
@dgpokl
dgpokl / gist:4010748
Created November 4, 2012 07:39
How to fix Zend PHP Warnings about mcrypt.so and memcached.so
sudo ln -s /usr/local/zend/lib/libltdl.3.dylib /usr/lib/libltdl.3.dylib && echo "OK."
sudo mkdir -p /usr/local/libmemcached-0.50z/lib && sudo ln -s /usr/local/zend/lib/libmemcached.8.dylib /usr/local/libmemcached-0.50z/lib/libmemcached.8.dylib && echo "OK."
## That's it, you're done.
## Both the above commands should echo "OK." if they completed successfully.
@dgpokl
dgpokl / ant_prepare_nosudo.sh
Created May 15, 2012 20:56
Fix ant prepare to not need sudo
ME=`whoami` ; sudo chown -R $ME /tmp/logs /tmp/tmp /Volumes/Work/dev
@dgpokl
dgpokl / gist:2370538
Created April 12, 2012 19:51 — forked from dx7/gist:1333785
Installing ruby-debug with ruby-1.9.3-p125
# Install with:
# bash < <(curl -L https://raw.github.com/gist/2370538)
#
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug
# And: http://stackoverflow.com/questions/7054948/ruby-debug19-on-ruby-1-9-3-preview1
echo "Installing ruby-debug with ruby-1.9.3-p125 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
@dgpokl
dgpokl / installing_rails_31_on_mac_os_x
Created April 12, 2012 00:46
Installing Ruby on Rails 3.1 for a clean install of Mac OS X
# This is a guide for how I installed rails 3.1 on a clean install of Mac OS X 10.7 Lion.
# There is no Warranty expressed, and I am not responsible for any issues that may arise from following this guide.
# Installing rails should be simple. I cringed at other peoples methods shared via Twitter.
# Keil Miller July 26, 2011
# Install RVM
$ curl -L get.rvm.io | bash -s stable
# Load RVM into new shells
# As instructed from the above command, add the line stated to the very bottom of the following file
@dgpokl
dgpokl / my.cnf
Created March 23, 2012 22:33
Put this in your /etc/my.cnf to enable mysqldump to work correctly on ZendServer CE
# Specifying socket to use for mysql/mysqldump
# For other settings refer to /usr/local/zend/mysql/data/my.cnf
[client]
socket = /usr/local/zend/mysql/tmp/mysql.sock
@dgpokl
dgpokl / .gitconfig
Created March 7, 2012 19:37
Useful things to have in your .gitconfig
[alias]
st = status