1
Tutorials / PHP - Upgrade all packages
Code: [Select]
dpkg -l | grep php8.0 | awk '{print $2}' | sed -e 's/8.0/8.1/' | xargs apt install
This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.
dpkg -l | grep php8.0 | awk '{print $2}' | sed -e 's/8.0/8.1/' | xargs apt install
pip install esptool
https://github.com/espressif/ESP8266_NONOS_SDK/archive/v2.2.1.zip
esptool.py --port /dev/tty.usbserial-A603AYEQ --baud 115200 write_flash --flash_mode dio 0x00000 boot_v1.2.bin 0x01000 at/512+512/user1.1024.new.2.bin 0x7B000 blank.bin 0x3FC000 esp_init_data_default_v05.bin 0x7E000 blank.bin
find . -type f -name '*.php' -exec php -l {} \;
find /home/tino/YAPortal/ -type f -exec sed -i 's/@version 1.0.1/@version 1.0.2/g' {} \;
find . -type f -name '*.txt' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
find . -iname '*.txt' -type f -exec sed -i '' 's/[[:space:]]\{1,\}$//' {} \+
SELECT T1.log_dt, T2.log_dt, EXTRACT(EPOCH FROM (T2.log_dt - T1.log_dt))
FROM power_data AS T1
INNER JOIN power_data AS T2
USING ( node )
WHERE T1.log_dt > '2017-05-05 22:10:00'
AND T2.log_dt > '2017-05-05 22:10:00'
ORDER BY T1.id, T2.id
LIMIT 2
#define ATOMIC for(INTCONbits.GIE=0;!INTCONbits.GIE;INTCONbits.GIE=1)
class MyClass {
public function __construct() {
echo 'I am initialized!';
}
}
$getMyClass = function() {
$myClass = new MyClass();
return $myClass;
};
$myClass = $getMyClass();
vim /etc/postfix/master.cf
-o receive_override_options=no_address_mappings
smtp inet n - - - - smtpd
vim /etc/postfix/recipient_bcc
upload@tinoest.co.uk upload-script@localhost
postmap /etc/postfix/recipient_bcc
vim /etc/postfix/transport
upload-script@localhost :
postmap /etc/postfix/transport
vim /etc/postfix/main.cf
recipient_bcc_maps = hash:/etc/postfix/recipient_bcc
transport_maps = hash:/etc/postfix/transport
vim /etc/aliases
upload-script: "|/usr/bin/postfix-parse"
systemcntl restart postfix
apt-get install ltsp-server dnsmasq
ltsp-build-client --arch i386
vim /etc/exports
/opt/ltsp *(ro,no_root_squash,async,no_subtree_check)
invoke-rc.d nfs-kernel-server reload
service nfs-kernel-server restart
ltsp-config dnsmasq
vim /opt/ltsp/i386/etc/ltsp/update-kernels.conf
CMDLINE_NFS="root=/dev/nfs ip=dhcp boot=nfs"
CMDLINE_NFS="root=/dev/nfs ip=dhcp boot=nfs nfsroot=/opt/ltsp/i386"
IPAPPEND=3
ltsp-chroot /usr/share/ltsp/update-kernels
ltsp-update-kernels
ORDER BY status ASC; will return 1,2,3,4.
ORDER BY status DESC; will return 4,3,2,1.
ORDER BY FIELD(status, 3, 2, 4, 1);
CREATE SEQUENCE teams_id_seq;
ALTER TABLE teams ALTER id SET DEFAULT nextval('teams_id_seq');
ALTER SEQUENCE teams_id_seq OWNER TO elabftw;
ALTER SEQUENCE teams_id_seq OWNED BY teams.id;
CREATE TABLE new_table AS SELECT * FROM old_table WHERE 1=2;
CREATE FUNCTION ts_round( timestamptz, INT4 ) RETURNS TIMESTAMPTZ AS $$
SELECT 'epoch'::timestamptz + '1 second'::INTERVAL * ( $2 * ( extract( epoch FROM $1 )::INT4 / $2 ) );
$$ LANGUAGE SQL;