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/sh | |
python -c 'import yum, pprint; yb = yum.YumBase(); pprint.pprint(yb.conf.yumvar, width=1)' |
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
package demo; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import rx.Observable; | |
import rx.Observable.OnSubscribe; | |
import rx.Subscriber; | |
import rx.functions.Func0; | |
import rx.util.async.Async; |
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
Copyright (C) Greg Wiley | |
Licensed under the Apache License, Version 2.0 (the "License") under | |
one or more contributor license agreements. See the NOTICE file | |
distributed with this work for information regarding copyright | |
ownership. You may not use this file except in compliance with the | |
License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
module FlowSpike where | |
{- | |
Model a distributed workflow with event-sourced control state. In | |
this model, the workflow spec is run every time a decision is requred. | |
A single run transforms a collection of pending and completed tasks | |
into a maybe result and collection of tasks to start. | |
This spike tries to expose the control flow problem and propose | |
an API. |
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
var curry = function (fn) { | |
var me = this; | |
function gen(cur) { | |
return function () { | |
var next = cur.concat(Array.prototype.slice.call(arguments)) | |
if (next.length >= fn.length) { | |
return fn.apply(me, next) | |
} else { | |
return gen(next) | |
} |
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
# source this for some sweet sweet aws session helpers | |
# invoke STS to get session creds and put them in vars where they can | |
# be passed into something such as a docker container. This places creds | |
# in the vars expected by the CLI so they will mask any set by aws configure | |
# | |
# aws-session | |
# docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN ... | |
aws-session() { | |
eval "$(aws sts get-session-token \ |
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
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "1.0.0", | |
"title": "CJ Identity and Access Service", | |
"description": "Services for registering and authenticating developers and apps", | |
"termsOfService": "http://developers.cj.com/tbd", | |
"contact": { | |
"name": "CJ Engineering", | |
"url": "http://developers.cj.com/" |
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
this is not quite it... | |
aws ecr list-images --repository-name MyRepository --query 'imageIds?type(imageTag)!=`string`.imageDigest' --output text | while read line; do aws ecr batch-delete-image --repository-name MyRepository --image-ids imageDigest=$line; done |
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
This allows anyone in the "gpio" group to do GPIO operations | |
------ /etc/udev/rules.d/98-gpio-group.rules | |
# UDEV RULE TO CHANGE GPIO GROUP | |
# INITIALLY WRITTEN BY IOT_STEVE | |
# UPDATED BY XTACOCOREX | |
# THIS REQUIRES change_gpio_perms.sh TO BE INSTALLED IN /usr/local/bin/ | |
SUBSYSTEM=="gpio", PROGRAM="/usr/local/bin/change_gpio_perms.sh" |
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
# Launch and log into a Ubuntu 16.04 instance in AWS | |
sudo apt-get update | |
sudo apt-get install -y gcc libgmp-dev libicu-dev zlib1g-dev libtinfo-dev libssl-dev | |
download='https://www.haskell.org/platform/download/8.2.2/haskell-platform-8.2.2-unknown-posix--core-x86_64.tar.gz' | |
wget "$download" -O platform.tgz | |
tar -xzvf platform.tgz | |
sudo ./install-haskell-platform.sh |
OlderNewer