edit node_modules\electron-rebuild\src\rebuild.ts:
add following code when initializing rebuildArgs:
rebuildArgs.push('--proxy=http://YOUR_PROXY_SERVER')
| #!/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 |
| 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 |
| HDMI_RESOLUTION=5 #720p | |
| cd /sys/kernel/debug/dispdbg | |
| echo disp0 > name; echo switch1 > command; echo 4 $HDMI_RESOLUTION 0 0 0x4 0x101 0 0 0 8 > param; echo 1 > start; | |
| 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') |
edit node_modules\electron-rebuild\src\rebuild.ts:
add following code when initializing rebuildArgs:
rebuildArgs.push('--proxy=http://YOUR_PROXY_SERVER')
| <!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> |
| Building upstream RISC-V GCC+binutils+newlib: the quick and dirty way | |
| September 5, 2017 | |
| There are a number of available options for building a RISC-V GCC toolchain. You might use the build system from the riscv/riscv-tools repository, or investigate toolchain generators such as crosstool-ng. However in the case of riscv-tools, it’s not always clear how this corresponds to the code in the relevant upstream projects. When investigating a potential bug, you often just want to build the latest upstream code with as little fuss as possible. For distribution purposes you’d probably want to perform a proper multi-stage build, but for a quick test you might find the following recipe useful: | |
| git clone --depth=1 git://gcc.gnu.org/git/gcc.git gcc | |
| git clone --depth=1 git://sourceware.org/git/binutils-gdb.git | |
| git clone --depth=1 git://sourceware.org/git/newlib-cygwin.git | |
| mkdir combined | |
| cd combined |
| # 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 |
| 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) |
| #/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 |