This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python application | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- 'content/**/*.md' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.9; | |
interface ICurvePool { | |
function A() external view returns (uint256); | |
function get_virtual_price() external view returns (uint256); | |
function calc_token_amount(uint256[3] calldata amounts, bool deposit) | |
external |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { ethers } = require("hardhat"); | |
describe("Consumer", () => { | |
let consumer; | |
before(async () => { | |
const Consumer = await ethers.getContractFactory("Consumer"); | |
consumer = await Consumer.deploy(); | |
await consumer.deployed(); | |
}); | |
it("#counter1", async () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: AGPL-3.0-or-later | |
pragma solidity 0.8.11; | |
contract Consumer{ | |
uint256 public counter; | |
function counter1() public { | |
for(uint256 i; i<1000; i++){ | |
counter = counter+i; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
become: yes | |
tasks: | |
- name: Update apt packages | |
apt: | |
upgrade: no | |
update_cache: yes | |
- name: Install packages for docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
networks: | |
default: | |
external: | |
name: front | |
services: | |
whoami: | |
image: containous/whoami | |
labels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG rocksdb_version="6.15.2" | |
ARG ruby_version="2.7.2" | |
FROM golang:alpine as build-stage | |
ARG rocksdb_version | |
RUN apk add --update --no-cache build-base linux-headers git cmake bash perl | |
RUN apk add --update --no-cache zlib zlib-dev bzip2 bzip2-dev snappy snappy-dev lz4 lz4-dev zstd zstd-dev gflags | |
# Install Rocksdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# UTXO checker for Bitcoin mainnet | |
api=https://blockstream.info/api | |
function usage() | |
{ | |
cat <<-EOF | |
usage: $(basename $0) tx_id index | |
EOF | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
path=$1 | |
go=$2 | |
commands='gist grep diff cut mktemp' | |
for c in $commands; do | |
hash $c || { echo "install $c"; exit 255; } | |
done | |
if [ ! -r $path ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
command=$1 | |
ssh_config_dir=~/.ssh | |
ssh_configs_dir=${ssh_config_dir}/conf.d | |
ssh_config_file=${ssh_config_dir}/config | |
ssh_base_config_file=${ssh_configs_dir}/config | |
function usage() | |
{ | |
echo "Usage: `basename $0` [update [go]] [add user@ipaddress alias]" |
NewerOlder