Skip to content

Instantly share code, notes, and snippets.

View douglasmiller's full-sized avatar

Douglas Miller douglasmiller

View GitHub Profile
@douglasmiller
douglasmiller / .my-prompt.sh
Created December 29, 2020 18:26
Multi-line bash prompt
if [ -f $HOME/.git-prompt.sh ]; then
# Outputs the current branch if in a git repository
source $HOME/.git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWCOLORHINTS=true
GIT_PS1_UNTRACKEDFILES=true
function get_color {
echo $ResetColor"\[\e["$1"\]"
}
Started GET "/trip-extras/info" for <IP ADDRESS> at 2017-08-22 16:06:40 -0500
Processing by InfoController#index as HTML
Completed 200 OK in 103ms (Views: 0.3ms | ActiveRecord: 0.6ms)
Started GET "/trip-extras/info" for <IP ADDRESS> at 2017-08-22 16:06:41 -0500
Processing by ReactController#index as HTML
----------
ID: tomcat-packages
Function: pkg.installed
Result: True
Comment: All specified packages are already installed
Started: 13:30:46.884836
Duration: 3.298 ms
Changes:
----------
ID: clean-tomcat8-default-webapps
salt-call state.sls packages.baser
local:
----------
ID: required-packages
Function: pkg.installed
Result: True
Comment: All specified packages are already installed
Started: 13:00:31.176915
Duration: 334.919 ms
Changes:
root:~# salt-call --version
salt-call 2016.3.4 (Boron)
root:~# salt-call state.sls packages.baser
local:
----------
ID: required-packages
Function: pkg.installed
Result: True
Comment: All specified packages are already installed
@douglasmiller
douglasmiller / gist:4170907
Created November 29, 2012 18:18 — forked from stovak/gist:1343996
Touch events for jQuery Cycle
Drupal.settings.isTouchDevice = function() {
return "ontouchstart" in window;
}
if ( Drupal.settings.isTouchDevice() ) {
Drupal.behaviors.jQueryMobileSlideShowTouchAdvance = {
attach: function(context, settings) {
self = Drupal.behaviors.jQueryMobileSlideShowTouchAdvance;
jQuery.each(jQuery(".views_slideshow_cycle_main.viewsSlideshowCycle-processed"), function(idx, value) {
value.addEventListener("touchstart", self.handleTouchStart);