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
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 "my_pack.my-task".
2018-12-18 23:18:56,693 140672270229168 DEBUG concurrency [-] ConcurrencyApplicator is attempting to acquire lock "action=my_pack.my-task,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
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: http://127.0.0.1/api/v1/executions, 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
djhaskin987 / png2icns
Created Dec 21, 2016
Convert PNG file to ICNS file
View png2icns
# Stolen from here: http://stackoverflow.com/a/20703594/850326
#!/bin/sh
export POSIXLY_CORRECT=1
if [ -z "${1}" -o -z "${2}" ]
then
echo "Usage: ${0} <name> <original-png-location>"
fi
name=$1
@djhaskin987
djhaskin987 / build-screen.sh
Last active Dec 12, 2016
Install screen with 256 color support on mac
View build-screen.sh
#!/bin/sh
export POSIXLY_CORRECT=1
set -xe
git clone git://git.savannah.gnu.org/screen.git
cd screen/src
sudo mkdir -p /etc/opt/screen
./autogen.sh
./configure --prefix=/opt/djhaskin987/screen --sysconfdir=/etc/opt/djhaskin987/screen/ --localstatedir=/var/opt/djhaskin987/screen/ --enable-colors256
@djhaskin987
djhaskin987 / update-alternatives-directory.sh
Created Dec 12, 2016
Update alternatives in a directory
View update-alternatives-directory.sh
set -x
dir="${1}"
for i in $(ls -1A $dir)
do
if [ -x ${dir}/${i} ]
then
update-alternatives --install /usr/bin/${i} ${i} ${dir}/${i} 1
fi
done
@djhaskin987
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
djhaskin987 / rdp.sh
Created Aug 30, 2016
Options to use with XFreeRDP
View rdp.sh
#!/bin/sh
set -x
xfreerdp \
"${@}"
+clipboard \
+compression \
/audio-mode:2 \
/network:lan \
/cert-ignore \
@djhaskin987
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)
v)))))
@djhaskin987
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.