Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
#
# Example usage:
# . jenkins-crop && post_build_job_with_parameters release 9.9.9 dt ff crop-9536-atats-validation
#
# The order of the parameters do not matter, except the comma-separated feature
# flags do need to come right after `ff`.
#########
@jqtruong
jqtruong / custom-animated-google-maps-markers.markdown
Created April 24, 2019 15:26
Custom Animated Google Maps Markers
@jqtruong
jqtruong / window-control.el
Created July 25, 2013 20:23
Another example of a temporary overlay map in emacs...
(defmacro repeater-map-more (keymaps &optional msg)
"For complex maps in which multiple repeatable keys are attached to
functions."
`(set-temporary-overlay-map
(let ((map (make-sparse-keymap)))
(loop
for (repeat-key fun) in ,keymaps
do (define-key map (vector repeat-key)
`(lambda () (interactive)
(if ,msg
@jqtruong
jqtruong / skip-ads.el
Created July 23, 2013 18:27
When i feel like taking a break to watch a video but now ads are everywhere, thought of this neat elisp script to turn off the volume for a specified number of seconds (otherwise defaults to 30) and message me when the time's up on a Mac OS X, using osascript... now if there was a way to switch back to my browser :) i'll try that on stumpwm!
(defun jqt/skip-ads (&optional seconds)
"SECONDS default to 30"
(interactive "p")
(let* ((seconds (number-to-string (or seconds 30)))
(command "osascript -e 'output volume of (get volume settings)'")
(output (shell-command-to-string command))
(current-volume (replace-regexp-in-string "[\s\n]" "" output))
(set-volume-command "osascript -e 'set volume output volume %s'"))
(shell-command (format set-volume-command 0))
(message "Ads stink! Turned volume (was at level %s) off for %s seconds..." current-volume seconds)
@jqtruong
jqtruong / temporary-overlay-map-example.el
Last active December 19, 2015 06:19
Use set-temporary-overlay-map to create single keybindings and by learning to let go of control...in emacs. Code learned from shell-switcher.el in which case C-' starts a shell then repeatedly hitting ' cycles to the next shell. In the example below, "C-, f" goes to the next window, then either b or f to move back and forth. The other example, "…
;;;;;;;;;;;;
;; macros ;;
;;;;;;;;;;;;
(defmacro repeater-map (repeat-key fun)
"For one-key maps to repeatly called `fun'."
`(set-temporary-overlay-map
(let ((map (make-sparse-keymap)))
(define-key map (vector ,repeat-key)
,fun)
map) t))
;; Connect using jabber-connect
;; My username from the HipChat configuration
;; from https://www.hipchat.com/account/xmpp
(setq jabber-account-list '(("10804_81219@chat.hipchat.com")))
;; To join HipChat rooms easily
(defvar hipchat-number "10804")
(defvar hipchat-nickname "Brian McKenna")
(defun hipchat-join (room)