This script will pump AWS SQS Messages from one queue into another queue.
./pump_sqs.sh {profile} {source-sqs-url} {target-sqs-url} [{iterations}]| # import config. | |
| # You can change the default config with `make cnf="config_special.env" build` | |
| cnf ?= config.env | |
| include $(cnf) | |
| export $(shell sed 's/=.*//' $(cnf)) | |
| # import deploy config | |
| # You can change the default deploy config with `make cnf="deploy_special.env" release` | |
| dpl ?= deploy.env | |
| include $(dpl) |
| UPDATE public.mytable SET | |
| jsonfieldname = jsonb_set( jsonfieldname, '{json_obj_key}', array_to_json( | |
| ARRAY( | |
| SELECT DISTINCT( UNNEST( ARRAY( | |
| SELECT json_array_elements_text( COALESCE( jsonfieldname::json->'json_obj_key', '[]' ) ) | |
| ) || ARRAY['Element to add'] ) ) | |
| ) | |
| )::jsonb ) | |
| WHERE id = 23 | |
| RETURNING *; |
| fs = require( "fs" ) | |
| request = require( "request" ) | |
| async = require( "async" ) | |
| ### call this in the octocats list: | |
| list = [] | |
| $( "img" ).each ( i, el )-> | |
| #console.log arguments | |
| _src = $( @ ).data( "src" ) |
| _data = | |
| foo: 23 | |
| bar: 42 | |
| bazz: null | |
| $.ajax | |
| url: _path | |
| type: "POST" | |
| data: JSON.stringify( _data ) | |
| contentType: "application/json; charset=utf-8" |
| #! /bin/sh | |
| # @author: Claus Witt | |
| # http://clauswitt.com/319.html | |
| # Adding or Removing Items to hosts file | |
| # Use -h flag for help | |
| DEFAULT_IP=127.0.0.1 | |
| IP=${3:-$DEFAULT_IP} |
| #!/bin/sh | |
| #colors | |
| COFF='\033[0m' | |
| CRED='\033[1;31m' | |
| CGREEN='\033[1;32m' | |
| CYELLOW='\033[0;33m' | |
| CCYAN='\033[1;36m' | |
| CBLUE='\033[1;34m' |
| #!/bin/sh | |
| # This script will update your ec2 security group with the current ip of your connection. | |
| # To find the "old" rules the description is used | |
| # Requirements: | |
| # - aws-cli with configured profile: https://aws.amazon.com/de/cli/ | |
| # - jq: https://stedolan.github.io/jq/ | |
| # - curl | |
| #################### |
| esphomeyaml: | |
| name: pow | |
| platform: ESP8266 | |
| board: esp01_1m | |
| board_flash_mode: dout | |
| wifi: | |
| ssid: 'Demo' | |
| password: 'Livestream' |
| # CRON: crontab header to run node and grunt within a cron job | |
| #!/bin/sh | |
| SHELL=/bin/sh | |
| PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin |