Skip to content

Instantly share code, notes, and snippets.

View daduskacpokus's full-sized avatar
:octocat:
https://codepen.io/daduskacpokus/pen/RzQbbb?editors=0011#0

Vladislav Tolstykh daduskacpokus

:octocat:
https://codepen.io/daduskacpokus/pen/RzQbbb?editors=0011#0
  • RU
View GitHub Profile
@bajcmartinez
bajcmartinez / mine.py
Created May 18, 2020 19:17
From Zero to Blockchain in Python - Part 1 - Mine
def mine(self, reward_address):
"""
Mines a new block into the chain
:param reward_address: <str> address where the reward coin will be transferred to
:return: result of the mining attempt and the new block
"""
last_block = self.last_block
index = last_block.index + 1
previous_hash = last_block.hash
@pm-hwks
pm-hwks / netcat.sh
Created August 21, 2019 07:03
[Netcat network test] Netcat commands to test bandwidth between 2 linux servers #netcat #perf-test #linux #network
## Netcat server command
nc -l <unused port # > /dev/null
eg:
nc -l 1122 > /dev/null
## Netcat Client command
dd if=/dev/zero bs=9100004096 count=1 | nc <netcat server> <netcat port>
eg:
dd if=/dev/zero bs=9100004096 count=1 | nc 10.0.1.251 1122
# ---- Base Node ----
FROM mhart/alpine-node:10 AS base
# install node
RUN apk add --no-cache nodejs-current
# set working directory
WORKDIR /root/nextApp
# copy project file
COPY package.json .
COPY tsconfig.server.json .
COPY .npmrc .
@mbaitelman
mbaitelman / README.md
Last active February 20, 2024 22:31
Automated Terraform Deployments Using Bitbucket Pipelines
@antonfisher
antonfisher / allow-privileged-for-microk8s.md
Last active September 24, 2021 09:53
MicroK8s add --allow-privileged=true flag

Add --allow-privileged=true to:

# kubelet config
sudo vim /var/snap/microk8s/current/args/kubelet

#kube-apiserver config
sudo vim /var/snap/microk8s/current/args/kube-apiserver

Restart services:

@nbigot
nbigot / ansible_playbook-aws-install-docker.yml
Last active April 8, 2024 19:30
Ansible playbook AWS - install docker
# Ansible playbook AWS - install docker
---
- name: "AWS - Install docker"
hosts: aws-docker-vms
become: yes
tasks:
- name: Update all packages
yum:
name: '*'
state: latest
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active July 2, 2024 20:44
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

skeithc@freedom ~ % ethminer --help
Usage ethminer [OPTIONS]
Options:
Work farming mode:
-F,--farm <url> Put into mining farm mode with the work server at URL (default: http://127.0.0.1:8545)
-FF,-FO, --farm-failover, --stratum-failover <url> Failover getwork/stratum URL (default: disabled)
--farm-retries <n> Number of retries until switch to failover (default: 3)
-S, --stratum <host:port> Put into stratum mode with the stratum server at host:port
-SF, --stratum-failover <host:port> Failover stratum server at host:port
@gunnarx
gunnarx / gist:527fbc385a2e76f89609d837b6447f85
Last active November 18, 2022 06:08
Docker to Virtualbox
@Qix-
Qix- / sha256.sh
Last active July 10, 2023 10:00
SHA256 in (mostly) pure Bash script
#!/usr/bin/env bash
# Released into the Public Domain.
#
# Original implementation in C by Brad Conte (brad@bradconte.com) <https://github.com/B-Con/crypto-algorithms>
# Ported to Bash (lol) by Josh Junon (josh@junon.me) <https://github.com/qix->
#
# Yes, it's absolutely as slow as it looks.
#
# The only external dependency it has is on a utility called `od`,