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
for i in `seq -f "%02g" 1 10`; do echo -n "Attempt $i:"; curl --max-time 5 https://your.website.com/login 2>/dev/null | wc; done | |
# Output will be something like: | |
# Attempt 01: 18 145 10011 | |
# Attempt 02: 18 145 10011 | |
# Attempt 03: 0 0 0 | |
# Attempt 04: 0 0 0 | |
# Attempt 05: 0 0 0 | |
# Attempt 06: 0 0 0 | |
# Attempt 07: 18 145 10011 |
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
# | |
# lib/factory_bot/strategy/create.rb | |
# | |
# coloring from: http://graysoftinc.com/terminal-tricks/random-access-terminal | |
# | |
module FactoryBot | |
module Strategy | |
class Create | |
@@__counts = Hash.new(0) | |
CSI = "\e[" |
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
hexdump = ->(bytes,width) {bytes.each_with_index{|b,i| print " [#{i.to_s(16).upcase.rjust(2,'0')}] " | |
if i%width==0; print "#{b.to_s(16).upcase.rjust(2,'0')} "; puts "" if (i+1) % width == 0};nil} |
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
decdump = ->(bytes,width) {bytes.each_with_index{|b,i| print " [#{i.to_s.rjust(3,' ')}] " | |
if i%width==0; print "#{b.to_s.rjust(3,' ')} "; puts "" if (i+1) % width == 0};nil} |
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
require 'openssl' | |
require 'stringio' | |
require 'base64' | |
class Cryptomancer | |
def initialize(alg: nil, key: nil) | |
@alg = alg || "AES-256-CBC" | |
@key = key || "1234567890123456ASDFasdfASDFasdf" # 32 byte key for 256-bit AES (16 bytes for 128-bit...) | |
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
Running initializer: set_load_path | |
Running initializer: set_autoload_paths | |
Running initializer: add_routing_paths | |
Running initializer: add_locales | |
Running initializer: add_locales | |
Running initializer: add_view_paths | |
Running initializer: load_environment_config | |
kringle/config/environments/development.rb | |
Running initializer: load_environment_hook | |
Running initializer: load_active_support |
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
q = [ | |
{ "$match" => { "created_at" => { "$gte" => 60.days.ago, "$lte" => 0.days.ago }}}, | |
{ "$group" => { _id: { | |
'year' => {'$year' => "$created_at"}, | |
'month' => {'$month' => "$created_at"}, | |
'day' => {'$dayOfMonth' => "$created_at"}, | |
"errorable_type" => "$errorable_type", | |
"error_class" => "$error_class" | |
}, | |
count: { "$sum" => 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
http://es-cerebro.apps.verisys.com:9222/cerebro_elicense/_search?size=100&q=%2Bepmatching_name%3Awalmart*+%2Bname%3A*10-3384* |
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
for index in `curl http://es-cerebro.apps.domain.com:9200/_cat/indices | grep "monitoring-es-6" | sort | head | sed 's/-.\{11\}\).*1 1.*/\1/g'`; do echo -e "\nDeleting: $index"; curl -X DELETE "http://es-cerebro.apps.verisys.com:9200/$index"; 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
match (npi:Registration{label:'NPI:1407098122'}), (m) where (m:Sanction or m:License or m:Registration or m:Ssn) with npi,m match p=allShortestPaths((npi)-[:FOUND_IN*0..6]-(m)) where NONE( x in nodes(p) where labels(x) = ['ExternalDatum'] and x.source = 'piidat' and x.source_id <> '61474244') unwind (nodes(p)) as node match(node)-[found_in:FOUND_IN]->(datum) where not (node:ExternalDatum) return distinct labels(node), node, collect(distinct found_in.payload) order by labels(node) |