Skip to content

Instantly share code, notes, and snippets.

View ImanMousavi's full-sized avatar

Iman ImanMousavi

View GitHub Profile
@ImanMousavi
ImanMousavi / softether.sh
Created April 14, 2023 21:12 — forked from bouroo/softether.sh
Install softether vpn server on ubuntu 16.04+
#!/usr/local/env bash
# Register vultr.com with free credit https://www.vultr.com/?ref=9206731-8H
# Create vps
# Tested on Ubuntu 18.04, Debian 10.0
# How to...
# 1. Save this file as softether-installer.sh
# 2. chmod +x softether-installer.sh
# 3. Run bash file
# > ./softether-installer.sh
# Or just
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.8.0;
pragma experimental ABIEncoderV2;
contract Wallet {
address[] public approvers;
uint8 public quorum;
struct Transfer {
@ImanMousavi
ImanMousavi / docker-build.sh
Created June 10, 2022 11:43 — forked from jawi/docker-build.sh
Shell script to build, tag and push docker images to a (local) docker registry
#!/bin/bash
#
# Usage: ./docker-build.sh </dir/to/dockerfile> <remote-registry-prefix>
#
# Example: ./docker-build.sh node-agent-service 10.0.1.16:5000/inaetics
#
# needs docker command (v1.3 or later) in order to work.
#
# (C) 2015 - jawi - licensed under Apache Public License v2.
@ImanMousavi
ImanMousavi / docker-compose.yml
Created May 21, 2022 10:57 — forked from Jorijn/docker-compose.yml
Docker Compose file to be used in combination with https://gist.github.com/Jorijn/141f49dd0c69901f28215893d5900bca. Place this in the cloned root of the blockbook project and run `docker-compose up -d`. Configuration sample: https://gist.github.com/Jorijn/c0f5d3daf6ab6d35ac25b47c2a5be331
version: "3"
services:
blockbook:
container_name: blockbook
restart: always
build: .
entrypoint:
- /go/src/blockbook/blockbook
- -sync
- -blockchaincfg=/home/blockbook/cfg/cfg.json
@ImanMousavi
ImanMousavi / neovim_install.sh
Created March 15, 2021 19:40 — forked from backroot/neovim_install.sh
neovim install for centos 7
# https://github.com/neovim/neovim/wiki/Installing-Neovim
yum -y install epel-release
curl -o /etc/yum.repos.d/dperson-neovim-epel-7.repo https://copr.fedorainfracloud.org/coprs/dperson/neovim/repo/epel-7/dperson-neovim-epel-7.repo
yum -y install neovim --enablerepo=epel
@ImanMousavi
ImanMousavi / Upgrade vim
Created September 6, 2020 05:46 — forked from yevrah/Upgrade vim
Update to Vim8 on Centos 7
################################################################################
# Method 1: Install using rpm packages (credit to DarkMukke)
#
rpm -Uvh http://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm
rpm --import http://mirror.ghettoforge.org/distributions/gf/RPM-GPG-KEY-gf.el7
# WARNING: removing vim-minimal uninstalls `sudo` if you skip the second step
# make sure to at least run `yum install sudo`
yum -y remove vim-minimal vim-common vim-enhanced
@ImanMousavi
ImanMousavi / XKB IR Keyboard
Created July 18, 2020 18:04 — forked from amiraliakbari/XKB IR Keyboard
XKB Customized Persian Keyboard Layout
// Iranian keyboard layout
// Replace with "/usr/share/X11/xkb/symbols/ir"
// Customized Version
////////////////////////////////////////
// Persian layout,
// based on
// Information Technology – Layout of Persian Letters and Symbols on Computer Keyboards
// ISIRI 9147 – 1st Edition
@ImanMousavi
ImanMousavi / start_docker_registry.bash
Last active June 7, 2020 13:44 — forked from PieterScheffers/start_docker_registry.bash
Start docker registry with letsencrypt certificates (Linux Ubuntu)
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
@ImanMousavi
ImanMousavi / GenerateEthereumWallet.php
Last active November 28, 2022 06:14 — forked from onimusya/GenerateEthereumWallet.php
Generate Ethereum Wallet using PHP
<?php
require_once "vendor/autoload.php";
use Sop\CryptoTypes\Asymmetric\EC\ECPublicKey;
use Sop\CryptoTypes\Asymmetric\EC\ECPrivateKey;
use Sop\CryptoEncoding\PEM;
use kornrunner\keccak;
/**
@ImanMousavi
ImanMousavi / countryinfo.py
Created April 16, 2018 05:19 — forked from pamelafox/countryinfo.py
Python list of country codes, names, continents, capitals, and pytz timezones
countries = [
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'},
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'},
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"},
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'},
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'},
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'},
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai