Skip to content

Instantly share code, notes, and snippets.

@feruzm
feruzm / detranslit.js
Created February 21, 2017 06:30 — forked from tamr/detranslit.js
detransliterate (latin to cyrillic)
detransliterate = (
function() {
var d = /\t+/g,
rus = "щ щ ш ч ц ю ю я я ё ё ж ъ ъ ы э э а б в г д е з и й й й к л м н о п р с т у ф х х ь ь".split(d),
eng = "shh w sh ch cz yu ju ya q yo jo zh `` '' y e` e' a b v g d e z i j i` i' k l m n o p r s t u f x h ` '".split(d);
return function(str) {
var i,
s = /[^[\]]+(?=])/g, orig = str.match(s),
t = /<(.|\n)*?>/g, tags = str.match(t);
@feruzm
feruzm / docker-cleanup-resources.md
Created September 26, 2017 04:28 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

Verifying my Blockstack ID is secured with the address 1HkD7MGyrszoyHBzWhNxN6ZoxYBCzeU3f1 https://explorer.blockstack.org/address/1HkD7MGyrszoyHBzWhNxN6ZoxYBCzeU3f1
Verifying my Blockstack ID is secured with the address 1HkD7MGyrszoyHBzWhNxN6ZoxYBCzeU3f1 https://explorer.blockstack.org/address/1HkD7MGyrszoyHBzWhNxN6ZoxYBCzeU3f1
@feruzm
feruzm / notes.js
Created December 4, 2017 07:47 — forked from AlwaysBCoding/notes.js
DecypherTV (Youtube) - Bitcoin Screencast
// Create a new directory, install bitcore-explorers, and run the node shell
mkdir bitcoin && cd bitcoin
npm install --save bitcore-explorers
node
// Require the Bitcore libraries into the global namespace
var bitcore = require(“bitcore-lib”)
var explo = require(“bitcore-explorers”)
var shell = {}
@feruzm
feruzm / schema.sql
Created April 14, 2018 14:01 — forked from skzap/schema.sql
SteemWhales db
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 5.5.36 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 8.3.0.4694
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
// steemwhales.com data importer
// this was made in the early days of steem
//
// a lot of things are wrong in it:
//
// how it doesnt use steemjs (it uses a super old module called steem rpc)
// the way it refreshes every existing accounts without priority for active accounts
// the way it stores the data (especially the history table)
// the way it counts followers (theres a much better API function for it now)
// it doesnt count delegation numbers
@feruzm
feruzm / witness_list.js
Created August 29, 2018 09:30
how to fetch witness list with dsteem
import * as dsteem from 'dsteem'
const client = new dsteem.Client('https://api.steemit.com')
export default async function main() {
const witnesses = await client.database.call('get_witnesses_by_vote', ["",100]);
console.log(witnesses) // Open your browser's console to see full output
}

Keybase proof

I hereby claim:

  • I am feruzm on github.
  • I am feruzm (https://keybase.io/feruzm) on keybase.
  • I have a public key ASAirBHggFeYlYW5cKPVOJMFgnMM3lYaPWtNmBvdx7IBHwo

To claim this, I am signing this object:

@feruzm
feruzm / meta.py
Last active October 3, 2019 10:13
metahash python script
#!/usr/bin/python3
# coding: utf-8
import sys
if sys.version_info < (3,0):
print('You use Python version lower than 3. For this script work use Python version 3 and more.')
exit(1)
import hashlib
import random