edit node_modules\electron-rebuild\src\rebuild.ts:
add following code when initializing rebuildArgs:
rebuildArgs.push('--proxy=http://YOUR_PROXY_SERVER')
<link rel="import" href="../chart-js/chart-js.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../ace-element/ace-element.html"> | |
<link rel="import" href="../code-mirror/code-mirror.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> |
#/usr/bin/python | |
# | |
# Written for PyUSB 1.0 (w/libusb 1.0.3) | |
# | |
import usb, sys # 1.0 not 0.4 | |
import time | |
import psutil |
import getpass | |
import base64 | |
from hashlib import pbkdf2_hmac | |
pwd = getpass.getpass() | |
salt = raw_input('Salt:') | |
iters = 10000 | |
hmac = pbkdf2_hmac(hash_name='sha256',password=pwd,salt=salt,iterations=iters) |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<title>title</title> | |
<link rel="stylesheet" href="style.css"> | |
<script src="script.js"></script> | |
</head> | |
<body> |
pinCoin = 1 | |
pinLcdCS = 2 | |
pinLcdCLK = 5 | |
pinLcdDAT = 7 | |
PWD='defaultpwd' | |
--dofile('secrets.lua') | |
timeLimit = 120 | |
initialSecondsPerCoin = 3600 |
edit node_modules\electron-rebuild\src\rebuild.ts:
add following code when initializing rebuildArgs:
rebuildArgs.push('--proxy=http://YOUR_PROXY_SERVER')
import getpass | |
import base64 | |
from hashlib import pbkdf2_hmac | |
pwd = getpass.getpass() | |
salt = input('Website Name:') | |
iters = 10000 | |
hmac = pbkdf2_hmac(hash_name='sha256',password=pwd.encode('utf8'),salt=salt.encode('utf8'),iterations=iters) | |
pwd = base64.b64encode(hmac).decode('utf8') |
# build rootfs on host | |
debootstrap --arch=arm64 buster rootfs https://mirrors.163.com/debian/ | |
chroot rootfs | |
apt install apt-transport-https network-manager nano sudo | |
useradd -m -G video,render,sudo,dialout -s /bin/bash pi | |
passwd pi | |
# edit /etc/fstab | |
/dev/mmcblk0p1 /boot vfat defaults 0 0 | |
/dev/mmcblk0p2 / ext4 defaults,noatime,nodiratime 0 1 |
How to setup postgresql in debian 11: | |
1. Install postgresql: | |
apt install postgresql postgresql-contrib | |
2. su to postgres account, in order to manipulate the database: | |
su - postgres | |
3. Create a user and database named with mydb, set password: | |
createuser -P mydb |
#!/usr/bin/env python3 | |
""" | |
Netcat-like UDP Tool in Python | |
This Python script provides a simple and lightweight netcat-like UDP tool that allows users to | |
send and receive data over UDP using IPv4 and IPv6 addresses. It is designed to be easy to use | |
and versatile, making it suitable for various networking tasks, including testing, debugging, | |
and learning purposes. | |
By following the netcat command-line style, this script offers users a familiar interface for |