Friday, February 7, 2020

Diet for Life

https://github.com/torvalds/linux

Exercise and eat a healthy diet


It’s important for everyone to be physically active and to choose healthy foods.
 This makes the liver’s jobs so much easier keeping it so it doesn’t have
 to work quite so hard. Good liver health begins with a good diet.
  Choose foods that support liver health such as whole grains, fruits, vegetables,
 lean meat, fish, nuts, seeds, and low-fat dairy.
  Avoid highly processed, fatty foods such as sausage, bacon,
 bologna, high-fat red meat, sweets such as cakes, pies, cookies,
 sugary beverages, and other low-nutrient dense foods. 
Physical activity is also important for liver health. 
 Experts recommend at least 30 minutes of moderate-to-vigorous exercise

Thursday, February 6, 2020

Set your network adapter from cmd line

netsh interface ip set address "connection name" static 192.168.0.101 255.255.255.0 192.168.0.1


netsh interface ip add dns "connection name" 208.67.222.222


netsh interface ip add dns "connection name" 208.67.220.220 index=2



Primary DNS value:
netsh interface ipv4 set dns "Local Area Connection" static 192.168.0.2
Secondary value:
netsh interface ipv4 add dns "Local Area Connection" 192.168.0.3 index=2
Which works great IF the name of the connection is correct. If the name isn't "Local Area Connection" then it will not work. If you are running XP you need to change "ipv4" to "ip". IPv6 can be used too.
Set subnet mask, IP Address, and Gateway:
netsh interface ipv4 set address name="Local Area Connection" source=static addr=192.168.1.10 mask=255.255.255.0 gateway=192.168.0.1
To Find the network connection you can use ipconfig from the cmd line. But you can also use the following for an abbreviated ipconfig result:
ipconfig | find /I "Ethernet adapter"
using the above ipconfig cmd we can loop through the connection (source code) and set the dns servers:
:: Set primary and alternate DNS for IPv4 on Windows Server 2000/2003/2008 & 
:: Windows XP/Vista/7
@ECHO OFF
SETLOCAL EnableDelayedExpansion

SET adapterName=

FOR /F "tokens=* delims=:" %%a IN ('IPCONFIG ^| FIND /I "ETHERNET ADAPTER"') DO (
SET adapterName=%%a

REM Removes "Ethernet adapter" from the front of the adapter name
SET adapterName=!adapterName:~17!

REM Removes the colon from the end of the adapter name
SET adapterName=!adapterName:~0,-1!

netsh interface ipv4 set dns name="!adapterName!" static 192.168.0.2 primary
netsh interface ipv4 add dns name="!adapterName!" 192.168.0.3 index=2
)

ipconfig /flushdns

:EOF


Portable Lazarus-ide

@echo off
rem
rem Simple script to relocate lazarus to use the current driveletter as
rem path, and put basic portable app support in lazarus.
rem 
rem Assumes lazarus is in drvletter:\lazarus and config in
rem $lazarusdir/config
rem
rem For this to work, everything should be relative wrt $(lazarusdir)
rem inside the IDE. If packages work is currently untested

Set DRV_LETTER=%cd:~0,1%:

set LAZARUSDIR=%DRV_LETTER%\lazarus

set FPCROOTDIR=%LAZARUSDIR%\fpc\2.6.0

set FPCBINDIR=%FPCROOTDIR%\bin\i386-win32

set LAZARUSCONFIG=%LAZARUSDIR%\config

for %%i in (%LAZARUSDIR%\fpc\*) do set ALTFPCROOTDIR=%%i

echo %ALTFPCROOTDIR%

%DRV_LETTER%

cd \

REM The next on one line

%FPCBINDIR%\fpcmkcfg -d basepath=%FPCROOTDIR% > %FPCBINDIR%\fpc.cfg

cd %LAZARUSDIR%

rem startlazarus? untested as yet 
rem should later get --lazarusdir=%LAZARUSDIR% 
rem if mantis 15741 (0.9.30+) is committed
rem

Lazarus.exe --primary-config-path=%LAZARUSCONFIG% --lazarusdir=%LAZARUSDIR%

http://newpascal.org/download.html





The Old Serbian Land (1360. ad):






Monday, February 3, 2020

Hardware info on Linux and Windows

Linux hardware info on Ubuntu or Linux Mint:

$ hwinfo --short


Windows 10 hardware info:

wmic memorychip list full

wmic diskdrive list full

wmic baseboard list full

wmic cdrom list full





https://www.howtogeek.com/117435/htg-explains-the-linux-directory-structure-explained/



*

So-so frameworks:

https://facebook.github.io/react-native/

https://ionicframework.com/#studio


Very good frameworks:


https://www.mendix.com/platform/


https://www.outsystems.com/