The sample source code is produced for the article below:
The code is not optimised or written in the best style. There are might be bugs, so use with caution and comments/fixes are welcome.
import os | |
from fabric.api import env, require, run, sudo, cd | |
env.project_name = '' | |
env.server_name = '' | |
env.webapps_root = '/opt/webapps/' | |
env.project_root = os.path.join(env.webapps_root, env.project_name) | |
env.activate_script = os.path.join(env.project_root, 'env/bin/activate') | |
env.wsgi_file = os.path.join(env.project_root, 'django.wsgi') |
The sample source code is produced for the article below:
The code is not optimised or written in the best style. There are might be bugs, so use with caution and comments/fixes are welcome.
#include <Wire.h> | |
#include <TimeLib.h> | |
#include <DS1307RTC.h> | |
#include <LiquidCrystal_I2C.h> | |
int budzikGodzina = 7, budzikMinuta = 0; | |
LiquidCrystal_I2C lcd(0x27, 16, 2); | |
tmElements_t tm; |
Following instructions from the excellent https://www.rinkeby.io/
A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,
0x827c4C5789957dfd8A6a90d904bef931CE1B8Fee |
import base64 | |
import hashlib | |
import hmac | |
from Crypto.Cipher import AES | |
key = base64.decodebytes(b'v4QC6l4ttEogiBYvjLyvbA==') | |
nonce = base64.decodebytes(b'3iNVHJXuCfYoU9QP49DGqw==') | |
ct = base64.decodebytes(b'x9WM3Qy15Xw/2Z6pGVKXVA==') |
{ | |
"version": 3, | |
"id": "f50f0234-d25c-42a9-8c2f-e777fafe5c2a", | |
"address": "389d46c0d5d20c8220ad236b5a25b348c67e3021", | |
"Crypto": { | |
"ciphertext": "7cc66b5740d2ce0942b5beef2a997f5d85a9ab0e10a166a9f31cc16372c72204", | |
"cipherparams": { | |
"iv": "d8acc1c0a3a18c61acc33ca05eeb19bf" | |
}, | |
"cipher": "aes-128-ctr", |
package main | |
import ( | |
"github.com/syndtr/goleveldb/leveldb" | |
"fmt" | |
"encoding/binary" | |
"github.com/ethereum/go-ethereum/core/types" | |
"bytes" | |
"github.com/ethereum/go-ethereum/rlp" | |
) |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin