Skip to content

Instantly share code, notes, and snippets.

Khan rezamt

Block or report user

Report or block rezamt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rezamt
rezamt / capnpcpp.log
Created Jan 3, 2020
capnp proto c++ install log
View capnpcpp.log
reza@ubu1901:~$ curl -O https://capnproto.org/capnproto-c++-0.7.0.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
100 1443k 100 1443k 0 0 107k 0 0:00:13 0:00:13 --:--:-- 240kt
reza@ubu1901:~$ tar zxf capnproto-c++-0.7.0.tar.gz
reza@ubu1901:~$ cd capnproto-c++-0.7.0
View node-capnp.log
reza@ubu1901:~/node-capnp$ npm install
> capnp@0.4.0 install /home/reza/node-capnp
> node ./build.js
(node:34779) [DEP0006] DeprecationWarning: child_process: options.customFds option is deprecated. Use options.stdio instead.
make: Entering directory '/home/reza/node-capnp/build'
CXX(target) Release/obj.target/capnp/src/node-capnp/capnp.o
../src/node-capnp/capnp.cc:239:82: warning: enum constant in boolean context [-Wint-in-bool-context]
kj::LowLevelAsyncIoProvider::ALREADY_CLOEXEC || kj::LowLevelAsyncIoProvider::ALREADY_NONBLOCK ||
@rezamt
rezamt / portainer.io
Created Aug 9, 2019
Portiner on Win2k16
View portainer.io
# Edit Register and add json file both was required
https://blog.airdesk.com/2017/10/windows-containers-portainer-gui.html
View wordpress-win2k16.ps
docker run -p 8081:80 --name wp1 -it -d nanoserver/iis-mysql-php-wordpress
docker run -p 8082:80 --name wp2 -it -d nanoserver/iis-mysql-php-wordpress
docker run -p 8083:80 --name wp3 -it -d nanoserver/iis-mysql-php-wordpress
docker run -p 8084:80 --name wp4 -it -d nanoserver/iis-mysql-php-wordpress
docker run -p 8085:80 --name wp5 -it -d nanoserver/iis-mysql-php-wordpress
docker run -p 8086:80 --name wp6 -it -d nanoserver/iis-mysql-php-wordpress
docker exec -it wp1 ipconfig
docker exec -it wp2 ipconfig
docker exec -it wp3 ipconfig
@rezamt
rezamt / e1.rs
Last active Jul 31, 2019
Rust Reference and Ownership Challenges
View e1.rs
#[derive(Copy, Clone, Debug)]
struct Label<'a> {
number: u32,
check: u32,
name: &'a str
}
fn main() {
let _args: Vec<String> = std::env::args().collect();
View nodes.sh
# Running mode in no console mode
java -jar corda.jar -n
# Running node in no console with ssh enabled
java -jar corda.jar -n --sshd --sshd-port=12222
View get_vpc_subnets.py
import argparse
import sys
import boto3
from netaddr import IPNetwork
parser = argparse.ArgumentParser()
parser.add_argument('--vpc-id', required=True)
parser.add_argument('--region', default='us-east-1')
@rezamt
rezamt / logging_demo.py
Created Jun 22, 2019
Python Helper Notes
View logging_demo.py
# replace all print with logging module
import logging
logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(asctime)s: %(message)s')
logging.info('Sample logging')
logging.error('Sample logging')
logging.critical('Sample logging')
@rezamt
rezamt / docker-repository-setup.sh
Created Jun 9, 2019
Setting up Docker Remote Repository
View docker-repository-setup.sh
# On Docker Repo Server - Run docker.io/repository:latest (docker version)
mkdir -p /docker_data/images # Docker images
mkdir -p /docker_data/certs # Repository SSL Certificate
# Get the hostname fqdn
hostname -f
# creating selfsign certificate
cd /docker_data/certs
View yumupdate.sh
# Getting list of available updates
yum updateinfo list
# Only security patches
yum updateinfo list security all
# Update only security patches
yum -y update --security
# Update for sepcific CVE
You can’t perform that action at this time.