We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 1 column, instead of 3 in line 5.
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
| Sample time from 2018-09-25 04:00:00 -0400 to 2018-09-25 04:01:00 -0400 | |
| --> COUNT CHECK | |
| All 1381 flow runs are found in flow run statuses | |
| --> STATUS CHECK | |
| There are 1381 records with different status | |
| flow_run_uuid, flow_run, flow_run_status | |
| 06439fb2-b667-435e-88c9-bd7f4d619fb9-21127, complete, init | |
| 0d4a80e0-799f-470e-9831-0afc820612fa-16320, complete, running |
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
| rp, wp = IO.pipe | |
| mesg = "ping " | |
| 20.times { |i| | |
| print "##{i} " | |
| rs, ws, = IO.select([rp], [wp]) | |
| require'pry-byebug';binding.pry | |
| if r = rs[0] | |
| ret = r.read(5) | |
| print ret | |
| case ret |
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 | |
| # http://misc.flogisoft.com/bash/tip_colors_and_formatting | |
| color_echo () { | |
| echo -e "\033[1;97;44m==> $1 \033[m" | |
| } | |
| color_echo "yarn lint" | |
| yarn lint |
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
| desc 'Compile scss files using Sprockets | |
| + source file: #{root}/lib/assets/stylesheets/application.scss, | |
| in which you could require the third party assets | |
| + output file: #{root}/build/emai.css | |
| ' | |
| task :compile do | |
| require 'third_party_assets' | |
| root = '~/Workspace/project/' |
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
| <div id="errors" style=" | |
| background: #c00; | |
| color: #fff; | |
| display: none; | |
| margin: -20px -20px 20px; | |
| padding: 20px; | |
| white-space: pre-wrap; | |
| "></div> | |
| <div id="container"></div> | |
| <script> |
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 a max heap to sort an array | |
| def heap_sort!(array) # Use ! to represent inplace | |
| # setup | |
| n = array.length | |
| array.unshift nil | |
| # build | |
| (n/2).downto(1) do |k| | |
| sink(array, k, n) | |
| 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
| port module Main exposing (..) | |
| import Html exposing (..) | |
| import Html.Events exposing (..) | |
| main = | |
| program | |
| { init = init | |
| , view = view |
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
| import Html exposing (..) | |
| import Html.Attributes exposing (..) | |
| import Html.Events exposing (..) | |
| import Html.App as Html | |
| -- model | |
| type alias Model = | |
| { | |
| shelves : Int, |
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 | |
| # Usage | |
| # | |
| # echo 'client list' | redis-cli -h $HOST -p $PORT | ./redis_client_ip.rb | |
| # | |
| # Reference | |
| # | |
| # http://www.jstorimer.com/blogs/workingwithcode/7766125-writing-ruby-scripts-that-respect-pipelines | |
| # http://redis.io/commands/client-list |
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
| # In Ruby, we can just use Array#flatten | |
| # | |
| # def flatten(array) | |
| # array.flatten | |
| # end | |
| # In case you want a manmade version | |
| def flatten(array) | |
| array.reduce([]) do |res, element| | |
| Array === element ? res += flatten(element) : res << element |