Skip to content

Instantly share code, notes, and snippets.

@nwgat
nwgat / ubuntu_update_booting_kernel.md
Created January 20, 2023 01:52 — forked from chaiyujin/ubuntu_update_booting_kernel.md
Ubuntu: Install Kernel and Set GRUB Default Kernel

Ubuntu: Install Kernel and Set GRUB Default Kernel

Install Kernel

Install the default kernel:

sudo apt install linux-generic

Set GRUB Default Kernel

  1. Find entrance from /boot/grub/grub.cfg
    • Get the $menuentry_id_option:
@nwgat
nwgat / choco.mirrorfrom.lftp
Last active July 5, 2022 20:38
choco.mirrorfrom.lftp
set sftp:auto-confirm yes
set sftp:connect-program 'ssh'
open sftp://user:password@site:port
mirror --verbose --use-pget-n=8 -c /remote/path /cygdrive/driveletter/folder
# NanoPi R4S Direct
C:\Windows\system32>iperf3 -c 192.168.1.203
Connecting to host 192.168.1.203, port 5201
[ 4] local 192.168.1.2 port 49832 connected to 192.168.1.203 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 112 MBytes 943 Mbits/sec
[ 4] 1.00-2.00 sec 113 MBytes 946 Mbits/sec
[ 4] 2.00-3.00 sec 113 MBytes 947 Mbits/sec
[ 4] 3.00-4.00 sec 113 MBytes 947 Mbits/sec

write all packages to file

cygcheck -c | awk '{ print $1}' | paste -s -d" " | awk '{gsub("Cygwin Package ", "");print}' > pkg.list

install apt-cyg

curl -k https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg -o apt-cyg && install apt-cyg /usr/bin

install packages

@nwgat
nwgat / install_cygwin_sshd.txt
Created August 14, 2020 03:55 — forked from roxlu/install_cygwin_sshd.txt
Installing CYGWIN + SSHD for remote access through SSH on windows
Installing CYGWIN with SSH
1) Download cygwin setup.exe from http://www.cygwin.com
- Execute setup.exe
- Install from internet
- Root directory: `c:\cygwin` + all users
- Local package directory: use default value
- Select a mirror to download files from
- Select these packages:
- editors > xemacs 21.4.22-1
- net > openssh 6.1-p
@nwgat
nwgat / gist:7d3d22c561c9015c81e85b1d3cd04274
Last active June 13, 2020 17:41
AUSDH32GUI3V30SHA2-RA1 A-DATA 32GB UHS-I U3 V30S(R:100MB/s/W:70MB/s) HIGH MicroSD w/adapter Raspberry Pi 4 2GB
pi@vale:~ $ curl https://raw.githubusercontent.com/geerlingguy/raspberry-pi-dramble/master/setup/benchmarks/microsd-benchmarks.sh | sudo bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2227 100 2227 0 0 4678 0 --:--:-- --:--:-- --:--:-- 4678
Raspberry Pi Dramble microSD benchmarks
microSD clock: 50.000 MHz
Installing iozone...
% Total % Received % Xferd Average Speed Time Time Time Current
@nwgat
nwgat / gist:283a0604035f1cb0b534cebb6e777caa
Created June 7, 2020 21:10
getting started with hue api
https://developers.meethue.com/develop/get-started-2/
@nwgat
nwgat / mirrorto.lftp
Last active April 12, 2019 23:01
mirrorto.lftp
set sftp:auto-confirm "yes"
set sftp:connect-program "ssh -v -a -x -i D:\path\to\key"
open sftp://user:password@site:port
mirror -R --verbose --use-pget-n=8 -c /cygdrive/driveletter/folder /remote/path;
@nwgat
nwgat / gist:93f99b269fa24c2301e9
Created November 6, 2015 19:33
mirrorscript
### Batch use (old)
mirror from server
<p>bash.exe ./lftp.exe sftp://user:password@site:port -e "set sftp:connect-program './ssh.exe'; mirror --verbose --use-pget-n=8 -c /remote/path /cygdrive/driveletter/folder; quit"</p>
mirror to server
<p> bash.exe ./lftp.exe sftp://user:password@site:port -e "set sftp:connect-program './ssh.exe'; mirror -R --verbose --use-pget-n=8 -c /cygdrive/driveletter/folder /remote/path; quit" </p>
### Nwgat LFTP Mirror Script (only SFTP for now)
*Dont work with 4.6.2 or later atm
General Information
Device Name: High Point Technologies RocketRAID 2720 SAS Controller
Original Device Name: High Point Technologies RocketRAID 2720 SAS Controller
Device Class: RAID controller
Revision ID: 3
PCI Address (Bus:Device:Function) Number: 40:0:0
PCI Latency Timer: 0
Hardware ID: PCI\VEN_1103&DEV_2720&SUBSYS_00001103&REV_03
PCI Express