Skip to content

Instantly share code, notes, and snippets.

Daniel Jay Haskin djhaskin987

Block or report user

Report or block djhaskin987

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
djhaskin987 / st2scheduler-scrubbed.log
Created Dec 19, 2018
Stackstorm Concurrency Error
View st2scheduler-scrubbed.log
2018-12-18 23:18:56,684 140672270229168 INFO handler [-] Scheduling liveaction: second_task_run (queue_item_id=5c19c6b022edb20192bc631f) (queue_item_id='5c19c6b022edb20192bc631f',liveaction_id='second_task_run')
2018-12-18 23:18:56,688 140672270229168 DEBUG policies [-] Applying pre-run policies for liveaction "second_task_run".
2018-12-18 23:18:56,690 140672270229168 DEBUG policies [-] Getting driver for policy "my_pack.my_pack.concurrency" (action.concurrency).
2018-12-18 23:18:56,690 140672270229168 DEBUG policies [-] Identified 1 policies for the action "".
2018-12-18 23:18:56,693 140672270229168 DEBUG concurrency [-] ConcurrencyApplicator is attempting to acquire lock ",policy_type=action.concurrency".
2018-12-18 23:18:56,693 140672270229168 INFO policies [-] Applying policy "my_pack.my_pack.concurrency" (action.concurrency) for liveaction "second_task_run".
2018-12-18 23:18:56,694 140672265936400 DEBUG connection [-] Sending request(xid=18): Exists(path=u'/tooz/locks
djhaskin987 / Main.hs
Created Nov 18, 2018
Haskell JSON-RPC nested struct server example
View Main.hs
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
-- The purpose of this RPC example is to show how to define a method using
-- JSON-RPC in Haskell without having to explicitly write the deserialization
-- code. It also shows at the same time that nested structs in the `params`
-- object in the RPC call are possible and even easy.
-- It is built off of the original json-rpc server example, found here:
View mistral_logs
2018-06-28 21:38:37.101 29017 INFO mistral.notifiers.notification_server [req-22840e07-dbe4-4213-9ab7-a2b6ae0fe840 - - - - -] Received RPC request 'notify'[ex_id=fca02cf9-e359-4f15-8399-f87fed8f5b51, event=WORKFLOW_FAILED, timestamp=2018-06-28T21:38:36.000000, data={u'workflow_name': u'examples.mistral-basic', u'updated_at': u'2018-06-28 21:38:36', u'workflow_id': u'39a0a055-68f9-439c-8475-7ecde31af63f', u'id': u'fca02cf9-e359-4f15-8399-f87fed8f5b51', u'state_info': u"Failure caused by error in tasks: task1\n\n task1 [task_ex_id=a9cfeda0-d8ee-4f00-bddf-d807a12ab25d] -> {status: 404, cookies: {}, encoding: None, url:, elapsed: 0.006918, content: {u'faultstring': u'The resource could not be found.'}, headers: {u'Content-Length': u'57', u'Access-Control-Allow-Headers': u'Content-Type,Authorization,X-Auth-Token,St2-Api-Key,X-Request-ID', u'Access-Control-Expose-Headers': u'Content-Type,X-Limit,X-Total-Count,X-Request-ID', u'X-Request-ID': u'015a26a0-512d-4570-9706-e85736050037'
djhaskin987 / png2icns
Created Dec 21, 2016
Convert PNG file to ICNS file
View png2icns
# Stolen from here:
if [ -z "${1}" -o -z "${2}" ]
echo "Usage: ${0} <name> <original-png-location>"
djhaskin987 /
Last active Dec 12, 2016
Install screen with 256 color support on mac
set -xe
git clone git://
cd screen/src
sudo mkdir -p /etc/opt/screen
./configure --prefix=/opt/djhaskin987/screen --sysconfdir=/etc/opt/djhaskin987/screen/ --localstatedir=/var/opt/djhaskin987/screen/ --enable-colors256
djhaskin987 /
Created Dec 12, 2016
Update alternatives in a directory
set -x
for i in $(ls -1A $dir)
if [ -x ${dir}/${i} ]
update-alternatives --install /usr/bin/${i} ${i} ${dir}/${i} 1
djhaskin987 / .gitattributes
Last active Sep 14, 2016
catch-all, end-all, One to Rule Them All, comprehensive gitattributes file; or, notes of my travels through other people's code.
View .gitattributes
# Use this line at your own risk
# * text=auto
# Editor save files
# (these should be in your gitignore)
*~ text
.*.sw[a-z] text
\#* text
.#* text
djhaskin987 /
Created Aug 30, 2016
Options to use with XFreeRDP
set -x
xfreerdp \
+clipboard \
+compression \
/audio-mode:2 \
/network:lan \
/cert-ignore \
djhaskin987 / functions
Last active Jul 31, 2016
Useful Clojure Macros
View functions
(defn assoc-conj
"Conjoin a value onto the list corresponding to the key `k` in `mp`."
[mp k v]
(if (empty? mp)
{k [v]}
(if (empty? (mp k))
(assoc mp [v])
(assoc mp
(conj (mp k)
djhaskin987 / header_of_pwfile.gpg
Last active May 26, 2016
For use with keeping track of passwords with gnupg.vim in encrypted text files
View header_of_pwfile.gpg
# vim: nobackup nowritebackup noswapfile bufhidden=wipe tw=0 conceallevel=2 concealcursor=nvc foldmethod=syntax syntax=password
You can’t perform that action at this time.