Skip to content

Instantly share code, notes, and snippets.

View shal's full-sized avatar
🇺🇦

Ali shal

🇺🇦
  • Poland, Warsaw
View GitHub Profile
@shal
shal / generate_api_keys.rake
Last active August 12, 2019 11:48
Modified rake task for barong api-keys generation
# 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
#!/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
@shal
shal / cancel_min_orders.rb
Last active June 13, 2019 17:16
Remove orders, which have price less than minimum price.
#!/usr/bin/env ruby
#
# Author: Ali Shanaakh <hi@shal.dev>
# Removes peatio orders, where prices less than min_ask_price.
#
# Usage:
# ./cancel_min_orders.rb
markets = ["usdeur"]
@shal
shal / debug.rb
Last active June 12, 2019 20:21
Debugger for cryptonodes
#!/usr/bin/env ruby
# Author: Ali Shanaakh <hi@shal.dev>
# Usage: debug.rb [options]
# -c, --client=CLIENT
# -a, --address=ADDRESS
# -n, --amount=AMOUNT
# -v, --verbose
require 'net/http'
@shal
shal / deposit_fiats.rb
Last active September 2, 2019 16:30 — forked from ysv/deposit_fiats.rb
deposits = [
{ member_id: 3, currency_id: :usd, amount: 1000 }
]
deposits.map do |d|
Deposits::Fiat.create!(d).tap(&:accept!)
end
@shal
shal / hotvin.go
Last active June 9, 2019 10:08
[CLOSED] VIN codes extractor from hotline server
package main
// Author: Ali Shanaakh <hi@shal.dev>
import (
"encoding/json"
"errors"
"log"
"net/http"
"net/url"
@shal
shal / README.md
Last active April 7, 2019 15:02
Template for README.md

Project

:emoji: Brief Overview

Overview

  • Project Architecture Diagram.
  • Long overview of project details and description.
  • Performance benchmarks.
@shal
shal / sql_benchmark.go
Last active June 9, 2019 10:09
Peatio SQL Benchmarks
package main
// Author: Ali Shanaakh <hi@shal.dev>
// Peatio SQL queries benchmark.
import (
"fmt"
"log"
"os"
"time"
@shal
shal / scheduler.sh
Last active June 9, 2019 10:11
Google Cloud Scheduler for VMs
#!/bin/bash -ex
# Author: Ali Shanaakh <hi@shal.dev>
check_vms() {
local PROJECT="gcloud-project"
local time=`date +%k%M`
local output=`gcloud compute --project "${PROJECT}" instances list --filter="labels.infinite: false" --format='table(name)'`
for instance in ${output[@]:4}; do
echo "Time now: $time"
@shal
shal / keybase.md
Created September 4, 2018 13:12
keybase.md

Keybase proof

I hereby claim:

  • I am shal on github.
  • I am ashanaakh (https://keybase.io/ashanaakh) on keybase.
  • I have a public key ASD-VlrjNhs9HMGLGNSskJWsUlBNV7AesaPzeUisUlwicAo

To claim this, I am signing this object: