Skip to content

Instantly share code, notes, and snippets.

View AlexanderC's full-sized avatar
💭
I might be slow to respond.

Alex Cryp AlexanderC

💭
I might be slow to respond.
View GitHub Profile
@AlexanderC
AlexanderC / crypto.csv
Created January 15, 2018 15:42
Crypto listing
We can't make this file beautiful and searchable because it's too large.
24h_volume_usd,add_date,algorithm,announcement,available_supply,cc_id,chat,chat_2,coin_type,explorer,explorer_2,explorer_3,facebook,id,image_url,last_updated,market_cap_usd,max_supply,message_board,message_board_2,mining_type,name,percent_change_1h,percent_change_24h,percent_change_7d,price_btc,price_usd,rank,slug,source_code,source_code_2,source_code_3,source_code_4,start_date,symbol,total_supply,twitter,website,website_2
24303.0,2014-01-13T22:00:00.000Z,Scrypt,https://bitcointalk.org/index.php?topic=1502028,42.0,4321,https://kiwiirc.com/client/chat.freenode.net/##42coin,,coin,https://chainz.cryptoid.info/42/,https://prohashing.com/explorer/42/,,,42-coin,https://www.cryptocompare.com/media/12318415/42.png,1515593641,2152302,42,,,PoW/PoS,42-coin,5.96,-0.7,4.72,3.71,51245.34,680,42-coin,https://github.com/42-coin/42,,,,2014-04-30T21:00:00.000Z,42,41.99997274,@42newchain,https://42-coin.org/,
7873.7,2017-07-24T21:00:00.000Z,,https://bitcointalk.org/index.php?topic=1992952.0,300.0,,,,token,https://etherscan.io/t
@AlexanderC
AlexanderC / gist:3986104
Created October 31, 2012 09:36 — forked from faleev/gist:3435377
Compile FFmpeg on Ubuntu

Compile FFmpeg on Ubuntu

This guide supports Ubuntu Precise Pangolin 12.04, Ubuntu Oneiric Ocelot 11.10, Ubuntu Natty Narwhal 11.04, and Ubuntu Maverick Meerkat 10.10. Separate guides are available for Ubuntu Lucid Lynx 10.04 and Ubuntu Hardy Heron 8.04. This guide will enable several external encoding and decoding libraries: libfaac (AAC encoder), libfdk-aac (AAC encoder), libmp3lame (MP3 encoder), libopencore-amr (AMR encoder/decoder), librtmp (for additional RTMP protocols), libtheora (Theora encoder), libvorbis (Vorbis encoder), libvpx (VP8 encoder/decoder), and libx264 (H.264 encoder). These are optional and may be omitted if desired. This guide will also install many filters (see the filter list in the [Filtering Guide](https://ffmpeg.org/trac/ffmpeg/wiki/Fi

@AlexanderC
AlexanderC / geth-jsonrpc-authorizzation-proxy.js
Last active November 12, 2020 09:55
Stupid JSONRPC proxy
/* file:./proxy.json
{
"servers": [
{
"token": "abc",
"port": "8007",
"target": "http://localhost:8008"
},
{
"token": "def",
@AlexanderC
AlexanderC / gist:03541f4cf68d316ca4b4f603dc55f36b
Created September 28, 2020 07:20
Docker: stop container and purge data and images.
alias docker-purge='(docker stop $(docker ps -aq) || echo "Skipping...") && (docker rm $(docker ps -aq) || echo "Skipping...") && (docker rmi -f $(docker images -q) || echo "Skipping...")'
@AlexanderC
AlexanderC / bc_integrity.sh
Last active November 14, 2019 10:30
Ethereum/geth synchronization check
#!/bin/bash
# Using crontab command:
# */10 * * * * $HOME/bc_integrity.sh ropsten 30311 200 'http://slackhook' >> $HOME/bc_integrity.log 2>&1
# You might want to cleanup log file, use crontab command:
# 0 8 * * * echo "$(tail -10000 $HOME/bc_integrity.log)" > $HOME/bc_integrity.log
network=$1 # ethereum network in letters (mainnet, ropsten, rinkeby etc.)
port=$2 # local geth port
threshold=$3 # number of blocks behind
slackHook=$4 # slack hook url
@AlexanderC
AlexanderC / moldovan_emojis.sh
Last active April 20, 2017 08:10
Dump Moldovan emojis from https://www.pinterest.com/fruitware/moldavian-emoji/ in a Slack compatible format
#!/usr/bin/env bash
_emoji_dir="$1"
_tmp_dir=$(mktemp -d)
_suffix=".emoji.png"
_script="_emoji.js"
_url="https://www.pinterest.com/fruitware/moldavian-emoji/"
_lib="pinterest-api"
die()
@AlexanderC
AlexanderC / _.php
Last active December 25, 2015 02:19
Hardcore USSR Framework...
<?php
class ☭ {
protected $☭;
public function __call($n, $v)
{
$this->☭ or ($this->☭ = (object)[]);
@$this->☭->{$n} or ($this->☭->{$n} = []);
$this->☭->{$n}[trim(mb_substr($v[0], 0, mb_strpos($v[0], "\n")))] = create_function(
@AlexanderC
AlexanderC / tree.php
Last active December 20, 2015 04:59
PHP bug reproducement
<?php
/**
* @author AlexanderC
*/
class Tree
{
/**
* @var Node
*/
@AlexanderC
AlexanderC / gist:4525951
Created January 13, 2013 20:13
Spherus alt method
<?php
//...
private static function ReadDirectory($path, $includeHiddenFiles = false, $readDirectories = true, $readFiles = true)
{
$result = [];
if (!$readFiles && !$readDirectories) {
return $result;
@AlexanderC
AlexanderC / changelog.sh
Created October 26, 2015 13:40
Generate markdown changelog using a github repo
#!/usr/bin/env bash
path=$(cd $(dirname $0); pwd -P)
### Your changes here
CHANGELOG_PATH="$path/../changelog"
LATEST_CHANGELOG_PATH="$path/../CHANGELOG.md"
### End
LAST_MODIFIED=$1