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 | |
| require File.join(ENV.fetch('RAILS_ROOT'), 'config', 'environment') | |
| Rails.logger.level = Logger::FATAL | |
| module Faraday | |
| NUMBER_OF_REQUESTS = 10000 | |
| class Ethereum |
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 | |
| # To execute with optional user and api keys amount. | |
| # rake generate:users -- -n=1000 | |
| require 'faker' | |
| namespace 'generate' do | |
| desc 'Build Application container' | |
| task :users => :environment do |
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 | |
| # Author: Ali Shanaakh <hi@shal.dev> | |
| # Usage: import_members.rb --path=users.yml | |
| require 'optparse' | |
| options = {} | |
| option_parser = OptionParser.new do |opts| | |
| opts.banner = 'Usage: import_members.rb [options]' |
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 { check } from "k6"; | |
| import http from "k6/http"; | |
| import { hmac } from "k6/crypto"; | |
| export let options = { | |
| // simulate rampup of trafficm 1 to 200 users over 5 minutes. | |
| stages: [ | |
| { duration: "12m", target: 50 }, | |
| ] | |
| }; |
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 main | |
| import ( | |
| "errors" | |
| "fmt" | |
| "os" | |
| "reflect" | |
| "strconv" | |
| "strings" | |
| ) |
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
| // Parser is a command line tool for parsing big XML file. | |
| // Author: Ali Shanaakh <hi@shal.dev> | |
| // Usage: go run parse.go -path=./15-ufop/15.1-EX_XML_EDR_UO_03.10.2019.xml | |
| package main | |
| import ( | |
| "encoding/xml" | |
| "flag" | |
| "fmt" | |
| "io" |
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 main | |
| import ( | |
| "encoding/json" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "time" | |
| ) |
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 main | |
| import ( | |
| "fmt" | |
| "runtime" | |
| "time" | |
| ) | |
| func cpuIntensive(p *int) { | |
| for i := 1; i <= 100000000000; i++ { |
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 | |
| update_system() { | |
| apt-get update && apt-get -y upgrade | |
| } | |
| download_video() { | |
| wget --progress=dot -O input.mp4 "https://hls-jmind-test.s3.eu-central-1.amazonaws.com/example/full_2160p_60fps.mp4" | |
| } |
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 main | |
| import ( | |
| "fmt" | |
| "os" | |
| "github.com/aliyun/aliyun-oss-go-sdk/oss" | |
| ) | |
| func main() { | |
| // Create an OSSClient instance. |