class RegisterFinish(luigi.Task):
item_id = luigi.IntParameter()
run_id = luigi.IntParameter()
def requires(self):
return [RunSubJob(self.item_id, self.run_id), NodepJob(self.item_id, self.run_id)]
def output(self):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Two input variables (1 array of hashes, 1 hash) | |
[ | |
{ | |
"key1": "value1a", | |
"key2": "value2a" | |
}, | |
{ | |
"key1": "value1b", | |
"key2": "value2b" |
I hereby claim:
- I am fields on github.
- I am fields (https://keybase.io/fields) on keybase.
- I have a public key whose fingerprint is 0E0B B45D 237B FACC 8D0D B47C DF7E 7EE8 7C19 81F5
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Even after terraform apply, terraform plan still sees policy changes: | |
~ aws_s3_bucket.bucketname | |
policy: "{\"Statement\":[{\"Action\":\"s3:PutObject\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::xxxxx:root\"},\"Resource\":\"arn:aws:s3:::bucketname/*\",\"Sid\":\"\"}],\"Version\":\"2012-10-17\"}" => "{\"Statement\":[{\"Action\":\"s3:PutObject\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam:xxxx:root\"},\"Resource\":\"arn:aws:s3:::bucketname/*\"}],\"Version\":\"2012-10-17\"}" | |
The policy file I’m specifying doesn’t have a SID, because a) I don’t want to hardcode that (and it should be optional), and b) it may be applied to multiple buckets. | |
This is the policy file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n -e "\033]0;$1\007" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
gems = `gem list` | |
puts "source https://rubygems.org" | |
gems.each_line{|line| | |
(gem, versions) = line.split(' ') | |
highest_version = versions.split(',').first.gsub(/[\(\)]/, '') | |
puts "gem '#{gem}', '#{highest_version}'" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yajl' | |
require 'mongo' | |
speedtest_json = `/path/to/speedtest-cli --json` | |
begin | |
if speedtest_json.nil? or speedtest_json == "" | |
raise Yajl::ParseError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using terms from application "Mail" | |
on perform mail action with messages theMessages for rule theRule | |
tell application "Mail" | |
set theText to "This AppleScript is intended to be used as an AppleScript rule action, but is also an example of how to write scripts that act on a selection of messages or mailboxes." & return & return & "To view this script, hold down the option key and select it again from the Scripts menu." | |
repeat with eachMessage in theMessages | |
set theSubject to subject of eachMessage | |
set theBody to content of eachMessage | |
try | |
-- If this is not being executed as a rule action, | |
-- getting the name of theRule variable will fail. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# override these variables in ~/.vagrant.d/Vagrantfile for your local changes | |
$local_username ||= `whoami`.strip | |
$local_projects_directory ||= "~/projects/vagrant/" | |
$vm_memory ||= "4096" | |
$vm_cpus ||= "4" | |
$server_root_password = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return-limits(){ | |
for process in $@; do | |
process_pids=`ps -C $process -o pid --no-headers | cut -d " " -f 2` | |
if [ -z $@ ]; then | |
echo "[no $process running]" | |
else | |
for pid in $process_pids; do | |
echo "[$process #$pid -- limits]" | |
cat /proc/$pid/limits | |
done |
NewerOlder