Skip to content

Instantly share code, notes, and snippets.

View ramilexe's full-sized avatar

Ramil Amerzyanov ramilexe

View GitHub Profile
import {
Avalanche,
BinTools,
BN,
Buffer
} from "avalanche"
import {
AVMAPI,
KeyChain as AVMKeyChain,
SECPTransferOutput,
@pmurzakov
pmurzakov / Badoo PHP Russia 2019 talk.md
Last active September 10, 2021 22:01
Badoo PHP performance -- useful links and snippets -- PHP Russia 2019 talk
@brianddk
brianddk / trezor_encrypt.py
Last active December 16, 2020 14:40
Trezor Offline Encrypt / Decrypt Sample Scripts
#!/usr/bin/env python3
# [rights] Copyright Dan B. (brianddk) 2019 https://github.com/brianddk
# [license] Licensed under Apache 2.0 https://www.apache.org/licenses/LICENSE-2.0
# [repo] https://gist.github.com/brianddk/4d7c44c0cd97b62a810c1b5a9d50af8d
# [version] Version 0.2
# [tipjar] LTC: LQjSwZLigtgqHA3rE14yeRNbNNY2r3tXcA
# [erratta] https://github.com/pyusb/pyusb/issues/203
# - Must use libusb-1.0.dll v1.0.21
# - Must install trezor[hidapi] v11.1
# [test] dir | trezor_encrypt.py | trezor_encrypt.py -d
@jukben
jukben / android_Fastlane
Last active October 28, 2021 10:51
Example of Circle CI config for React Native CI (Appcenter, Kotlin, Swift, RN 0.49+, Haul packager, signing via Match, be sure that you have set env MATCH_PASSWORD, FASTLANE_PASSWORD and SLACK_URL)
fastlane_version "2.64.1"
default_platform :android
platform :android do
lane :beta do
gradle(task: "assembleRelease")
appcenter_upload(
api_token: "",
@bnoordhuis
bnoordhuis / bytestokey.js
Created November 29, 2017 22:55
Compute key+IV from passphrase (createCipher to createCipheriv migration script)
// Copyright (c) 2017, Ben Noordhuis <[email protected]>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
@anvk
anvk / psql_useful_stat_queries.sql
Last active February 17, 2025 18:48
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
@chriseth
chriseth / snarktest.solidity
Last active December 3, 2023 07:03
zkSNARKs test code
// This file is MIT Licensed.
//
// Copyright 2017 Christian Reitwiessner
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF O
@FelicianoTech
FelicianoTech / gist:56ad8f63156e233e6a16df50fe6d4791
Created August 22, 2017 23:02
Using AWS ECR with CircleCI 2.0 (docker executor)
version: 2
jobs:
build:
docker:
- image: circleci/openjdk:8-jdk
steps:
- checkout
- setup_remote_docker
- run:
name: install aws
@F21
F21 / gist:08bfc2e3592bed1e931ec40b8d2ab6f5
Last active October 23, 2022 12:36
Minikube RBAC Quick Start
minikube start --kubernetes-version=v1.7.0 --extra-config=apiserver.Authorization.Mode=RBAC
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
minikube dashboard
@snewell92
snewell92 / mysql.js
Created June 2, 2017 16:01
Sequelize ES6 model syntax
var Promise = require('bluebird');
const Sequelize = require('sequelize');
const fs = Promise.promisifyAll(require('fs'));
const _ = require('lodash');
const sequelize = new Sequelize(connectionString, {
dialect: 'mysql',
logging: false,
pool: { // application-side connection pool configuration