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
./parent.rb | |
command: ./child.rb 1 | |
2018-09-12 14:32:09: stdout | |
2018-09-12 14:32:09: stderr | |
2018-09-12 14:32:11: stdout | |
2018-09-12 14:32:11: stderr | |
pid 97509 exit 1 | |
97509 | |
false | |
command: ./child.rb 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
'use strict'; | |
// ENV vars | |
const AWS_REGION_STRING = process.env.AWS_REGION || 'us-east-1'; | |
const AWS_ACCOUNT_ID = process.env.AWS_ACCOUNT_ID; | |
const SNS_TOPIC_NAME = process.env.SNS_TOPIC_NAME; | |
const SNS_TOPIC_ARN = `arn:aws:sns:${AWS_REGION_STRING}:${AWS_ACCOUNT_ID}:${SNS_TOPIC_NAME}`; | |
const AWS = require('aws-sdk'); | |
AWS.config.update({ |
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 bash | |
INPUT_FILE=some-input-file.txt | |
OUTPUT_FILE=output.txt | |
while read p; do | |
pipecount=$(echo $p | awk -F"|" '{print NF}') | |
if [ $pipecount == 45 ]; then | |
echo "$p|" >> $OUTPUT_FILE | |
else |
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
0.11.8 |
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
8.10.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
person-data |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch Program", | |
"program": "${workspaceFolder}/test.js", | |
"runtimeExecutable": "${workspaceRoot}/node.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
# frozen_string_literal: true | |
class Color < ApplicationRecord | |
scope :red, -> { where(color: 'red') } | |
scope :yellow, -> { where(color: 'yellow') } | |
scope :blue, -> { where(color: 'blue') } | |
scope :non_primary, -> { where.not(id: red).where.not(id: yellow).where.not(id: blue) } | |
end |
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 Helpers | |
def with_captured_stdout | |
original_stdout = $stdout | |
$stdout = StringIO.new | |
yield | |
$stdout.string | |
ensure | |
$stdout = original_stdout | |
end | |
end |
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 | |
# Usage: | |
# . ./setenv.sh | |
# | |
# echo $ENV1 | |
# blah1 | |
# | |
# echo $ENV2 | |
# blah2 |