Skip to content

Instantly share code, notes, and snippets.

View akirill0v's full-sized avatar

Alexander Kirillov akirill0v

View GitHub Profile
@akirill0v
akirill0v / .pre-commit.sh
Created May 23, 2018 11:19 — forked from glfmn/.pre-commit.sh
Template pre-commit script for running tests on Rust projects especially, but appropriate for any project.
#!/usr/bin/env sh
# pre-commit.sh
STASH_NAME="pre-commit-$(date +%s)"
ROOT_DIR="$(git rev-parse --show-toplevel)"
BUILD_DIR="${ROOT_DIR}/target"
BRANCH_NAME=$(git branch | grep '*' | sed 's/* //')
RED='\033[1;31m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
@akirill0v
akirill0v / add-new-crypto-to-peatio.md
Created October 24, 2017 07:04 — forked from brossi/add-new-crypto-to-peatio.md
Adding A New Cryptocurrency to Peatio

State: Draft
Based on the Peatio Stable branch


Coin Daemon

To the coin daemon's {coin}.conf file, include the -walletnotify command:

# Notify when receiving coins
@akirill0v
akirill0v / vexor.yml
Last active September 7, 2017 13:48 — forked from ekorneeff/vexor.yml
language: ruby
rvm:
- 2.2.2
database:
- cp mongoid.yml.example mongoid.yml
- bundle exec db:create db:migrate
services:
- redis
@akirill0v
akirill0v / AbstractToken.sol
Created June 21, 2017 05:02 — forked from anonymous/AbstractToken.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.11+commit.68ef5810.js&optimize=undefined&gist=
pragma solidity ^0.4.6;
/// Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20
/// @title Abstract token contract - Functions to be implemented by token contracts.
contract AbstractToken {
// This is not an abstract function, because solc won't recognize generated getter functions for public variables as functions
function totalSupply() constant returns (uint256 supply) {}
function balanceOf(address owner) constant returns (uint256 balance);
function transfer(address to, uint256 value) returns (bool success);

Keybase proof

I hereby claim:

  • I am saratovsource on github.
  • I am akirill0v (https://keybase.io/akirill0v) on keybase.
  • I have a public key ASAxqSoLFi_gYSYmzPH9LO4KDoABU74NZppVdTHoDhmQ2Ao

To claim this, I am signing this object:

# swith to sudo
sudo -i
# create swap
touch /2GiB.swap
chattr +C /2GiB.swap
fallocate -l 2048m /2GiB.swap
chmod 600 /2GiB.swap
mkswap /2GiB.swap
@akirill0v
akirill0v / 1_faraday.rb
Created February 8, 2016 22:06 — forked from iain/1_faraday.rb
A small sample of Faraday using Etags for caching
require 'logger'
$logger = Logger.new(STDOUT)
require 'active_support/cache'
$cache = ActiveSupport::Cache.lookup_store(:memory_store)
$cache.logger = $logger
$cache.clear
class EtagMiddleware
@akirill0v
akirill0v / exporter.rb
Last active January 11, 2016 17:30 — forked from jcasimir/exporter.rb
Export ActiveRecord Tables to CSV
require 'csv'
module Exporter
DEFAULT_EXPORT_TABLES = [ FaceNew::User ]
DESTINATION_FOLDER = "tmp/"
def self.included(klass)
klass.extend ClassLevelMethods
end
deploy:
- shell:
- echo $(ansible --version)
- cd ansible && erb secret.yml.erb > secret.yml
- ./bin/ansible-play -vvv -l production -t deploy -e revision=$CI_BUILD_SHA
branch: master
- shell:
- echo $(ansible --version)
- cd ansible && erb secret.yml.erb > secret.yml
- ./bin/ansible-play -vvv -l staging -t deploy -e revision=$CI_BUILD_SHA