Dashing widget to show the build status of a CircleCI project.
- Get a Circle API Token from your Account Dashboard and set it in your environment as
CIRCLE_CI_AUTH_TOKEN
- Add the
httparty
to your Gemfile and runbundle install
Then:
def select2_select(text, options) | |
page.find("#s2id_#{options[:from]} a").click | |
page.all("ul.select2-results li").each do |e| | |
if e.text == text | |
e.click | |
return | |
end | |
end | |
end |
Dashing widget to show the build status of a CircleCI project.
CIRCLE_CI_AUTH_TOKEN
httparty
to your Gemfile and run bundle install
Then:
# https://news.ycombinator.com/item?id=6568137 | |
inotifywait -m -e modify,close_write,move,move_self,create,delete,delete_self -r . | while read; do make; done |
1) Render content for page | |
2) Parse form contents from page before delivery, parse validation fields, save, sign, inject content | |
3) Validate signature on validation content on form, validate according to HTML form validation rules. |
-----BEGIN PGP MESSAGE----- | |
Version: GnuPG v2.0.22 (Darwin) | |
hQIMAw+MY6dm20KGAQ//ZKHiKW1q9Teo3C66GvVV2jPbfyI+XhTKnAnJQe6uHCtn | |
tNBw8qjbfADGqaEkX/drrWBhLeiuYaE1EzkNj9dxrLy1Z2ZoX8tT8U/uKpyIpZXZ | |
KBtY++g7vnJJPMJ90f8MEyEqejzggXFjwGkhVaV9e1b1KFq8YOJjLVKd2tGTctia | |
RZUC2wZGBAGvUcuHxvX4cTKUwENgnNUqZRLLO6X4YvZCtpNdIoxbipFc9ENeZgGw | |
ApDwOJIDcFVI+dEu661pqUBRok4+dQiQ6PLMNNTIfHQ3898lFuYkrYm2bGA0Z5VK | |
mSUP4HiYL9zNq0hzRmpDjyccXRhH7pJw5RbGYVEOVetMM86tLZPkul7IbHJ0wErO | |
MSYw3nZK5lwQPcjMPJugTpzy/f7pPWeK8qthsBX/I71gF0rx9QEatgm5kEEeq6So |
Given | |
1) A drone can carry a recharge load for another drone | |
2) A drone can fly 2*X distance before a recharge | |
3) A drone must leave point A, reach point B, and return to point A. | |
If distance AB < X then no recharge is required. | |
If distance AB == 2X then | |
Drone 1 flies to <X | |
Drone 2 flies to <X, charges Drone 1, returns to A |
loner = (fn, delay)-> | |
lastRun = new Date() | |
timeout = null | |
runner = -> | |
args = arguments | |
clearTimeout(timeout) if timeout | |
wait = delay - (new Date() - lastRun) |
drain := make(chan bool, len(tasks)) | |
answer := make(chan interface{}, 1) | |
drained := make(chan bool, 1) | |
for _, v := range tasks { | |
go func(){ | |
defer func(){ | |
drain <- true | |
}() |
/* | |
The classification of contempts as direct and indirect is merely a semantic device for | |
differentiating contempts that can be adjudicated summarily from those that can be adjudicated | |
only after adequate notice and hearing. When a contempt occurs within the "immediate view and | |
presence of the court" the judge is fully informed of all facts necessary to adjudicate the guilt or | |
innocence of the alleged contemner. When, however, the court is not so informed of such facts, | |
notice and hearing are necessary to get them.... | |
In stating that "The failure of an attorney, without valid excuse, to be present... constitutes... | |
a direct contempt"... the majority opinion itself implicitly concedes that petitioner's contempt, if |
UPDATE: Please see http://self-issued.info/docs/draft-jones-json-web-token-06.html and the implementation here https://github.com/progrium/ruby-jwt for another method for JSON specific requests.
(if you run into this post and are about to use a different method that doesn't pose any particular benefit, use this one - post an alternative if there's a benefit!)
When a third party is given the option of sending a url-form-encoded request containing a signature value, we need a method of signing all keys and values as well as a signature, without the inclusion of the signature itself in the hash.