Skip to content

Instantly share code, notes, and snippets.

Avatar
🐊
^^

Alexander Shevchenko shov

🐊
^^
View GitHub Profile
@shov
shov / default.conf
Created Mar 18, 2020
Nginx to Nodejs proxy with SSL
View default.conf
server {
listen 80;
server_name example.com;
# Redirect all traffic to SSL
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
@shov
shov / reborn_brew.sh
Created Apr 1, 2019
Reborn brew packages after migration
View reborn_brew.sh
#!/bin/bash
brew list -1 > brew.txt \ # list out all installed packages
&& brew list -1 | xargs brew rm --force \ # remove all installed packages
&& brew install $(cat brew.txt | tr '\n' ' ') \ # install all previously installed packages
&& rm brew.txt
@shov
shov / autoload.php
Last active Feb 13, 2019 — forked from holisticnetworking/autoload.php
Autoloading for both WordPress classes and PSR-4
View autoload.php
<?php
/**
* Autoload PSR-4 and Wordpress compatible named classes,
* Require it in very begin of your functions.php or plugin
*
* @author Alexandr Shevchenko <ls.shov@gmail.com>
* @author Thomas J Belknap <tbelknap@holisticnetworking.net>
*/
namespace App; //Change it
/** @var string : autoload root $rootDir */
@shov
shov / links.txt
Created Jan 22, 2019
XDebug on laradock
View links.txt
@shov
shov / gitroutine.md
Last active Nov 6, 2018
git routine
View gitroutine.md

New empty repository started on github

  1. Go github, create new repo
  2. Copy ssh/https link
  3. Go to your project folder 4.git clone <paste link here> and all project will be downloaded to new folder with same name as project is
  4. Or you can set name of this folder git clone <paste link here> newfolder

New repository from existing project

@shov
shov / git_log.sh
Created Oct 11, 2018
Beautiffied git log
View git_log.sh
git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
@shov
shov / Dockerfile
Created May 21, 2018
Docker file for PHP 7.2 fpm with mcrypt support
View Dockerfile
FROM php:7.2-fpm
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# make sure apt is up to date
RUN apt-get update --fix-missing
RUN apt-get install -y curl
RUN apt-get install -y build-essential libssl-dev zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev
@shov
shov / Dockerfile
Created May 21, 2018
Docker PHP 7.2 fpm with GD jpg, png suppot
View Dockerfile
FROM php:7.2-fpm
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# make sure apt is up to date
RUN apt-get update --fix-missing
RUN apt-get install -y curl
RUN apt-get install -y build-essential libssl-dev zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev
@shov
shov / Dockerfile-part
Created May 12, 2018
Laradock dockerfile parts for php-fpm and workspace to install zeroMQ zmq
View Dockerfile-part
##PHP-FPM
RUN apt-get update -yqq && \
apt-get install -y build-essential libtool autoconf pkg-config libsodium-dev libzmq-dev && \
echo '' | pecl install -o -f zmq-beta && rm -rf /tmp/pear && \
echo "extension=zmq.so" > /usr/local/etc/php/conf.d/zmq.ini \
##WORCKSPACE
RUN apt-get update -yqq && \
apt-get install -y build-essential libtool autoconf pkg-config libsodium-dev libzmq-dev && \
echo '' | pecl install -o -f zmq-beta && rm -rf /tmp/pear && \
@shov
shov / fetchtransactionsbywallet.md
Last active Aug 21, 2018
Etherscan public API to fetch transactions by wallet
View fetchtransactionsbywallet.md

Etherscan public API

Overview

There is no documentation at the moment, but there are some rumors. And experemental way I've made sure about few end-points are working good:

Common account info

GET: https://www.etherchain.org/api/account/0xAAAsomeADDR00000000000/ Will return something like that:

{