Update KDE Neon
sudo pkcon refresh && sudo pkcon update
References
https://averagelinuxuser.com/10-things-to-do-after-installing-kde-neon/
sudo pkcon refresh && sudo pkcon update
References
https://averagelinuxuser.com/10-things-to-do-after-installing-kde-neon/
DateTime dateTimePlus2 = DateTime.parse("2015-07-09T05:10:00+02:00"); System.out.println(dateTimePlus2); DateTime dateTimeUTC = dateTimePlus2.withZone(DateTimeZone.UTC); System.out.println(dateTimeUTC); LocalDateTime localDateTimeUTC = dateTimeUTC.toLocalDateTime(); System.out.println(localDateTimeUTC);
References
https://stackoverflow.com/questions/27381626/convert-joda-time-datetime-with-timezone-to-datetime-without-timezone
https://stackoverflow.com/questions/23939576/how-to-specify-a-timezone-for-a-joda-datetime-object
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss"); DateTime dt = formatter.parseDateTime(string);
@RequestMapping(value = "/image-manual-response", method = RequestMethod.GET) public void getImageAsByteArray(HttpServletResponse response) throws IOException { InputStream in = servletContext.getResourceAsStream("/WEB-INF/images/image-example.jpg"); response.setContentType(MediaType.IMAGE_JPEG_VALUE); IOUtils.copy(in, response.getOutputStream()); }
or
@GetMapping( value = "/get-image-with-media-type", produces = MediaType.IMAGE_JPEG_VALUE ) public @ResponseBody byte[] getImageWithMediaType() throws IOException { InputStream in = getClass() .getResourceAsStream("/com/baeldung/produceimage/image.jpg"); return IOUtils.toByteArray(in); }
References
https://www.baeldung.com/spring-mvc-image-media-data
https://www.baeldung.com/spring-controller-return-image-file
sudo apt install iptables-persistent netfilter-persistent
systemctl enable netfilter-persistent netfilter-persistent save netfilter-persistent start iptables-save > /etc/iptables/rules.v4 ip6tables-save > /etc/iptables/rules.v6 iptables-restore < /etc/iptables/rules.v4 ip6tables-restore < /etc/iptables/rules.v6 systemctl stop netfilter-persistent systemctl start netfilter-persistent systemctl restart netfilter-persistent
Remove persistent iptables rules
To remove persistent iptables rules simply open a relevant /etc/iptables/rules.v*
file and delete lines containing all unwanted rules.
References
https://askubuntu.com/questions/1052919/iptables-reload-restart-on-ubuntu-18-04
https://linuxconfig.org/how-to-make-iptables-rules-persistent-after-reboot-on-linux
nano /etc/sysctl.conf
net.ipv4.icmp_echo_ignore_all=1
sysctl -p
sudo iptables -A INPUT -p icmp --icmp-type echo-request -j DROP sudo iptables -A OUTPUT -p icmp --icmp-type echo-reply -j DROP
then Make iptables rules persistent after reboot on Ubuntu 18.04
References
https://vitux.com/how-to-block-allow-ping-using-iptables-in-ubuntu/
http://ubuntuhandbook.org/index.php/2013/07/disable-ping-response-ubuntu-server/
Install NVIDIA Drivers
sudo mhwd -a pci nonfree 0300
Configure The Resolution/Refresh Rate
sudo nvidia-settings
Save to X Configuration File button and save to /etc/X11/mhwd.d/nvidia.conf
sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf
Configure X Screen settings (OpenGL Settings, Antialiasing, X Server XVideo)
Troubleshooting: X-Server Failed to Start and Install
sudo mhwd -r pci video-nvidia
Reboot your computer
sudo gedit /etc/mkinitcpio.conf
delete the word nouveau from the following line:
MODULES=" nouveau"
# sudo mkinitcpio -p [linux kernel version] sudo mkinitcpio -p linux419
sudo mhwd -a pci nonfree 0300
Update mirrorlist with the fastest mirrors
sudo pacman-mirrors --fasttrack && sudo pacman -Syyu
Limit to 5 mirrors
sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu
Mirrors for your country only
sudo pacman-mirrors --geoip && sudo pacman -Syyu
References
https://wiki.manjaro.org/Pacman-mirrors
0 * * * * <command>
should work and will run at every 1 hour
References
https://serverfault.com/questions/256131/how-to-cron-run-every-1-hour-on-ubuntu-9
https://unix.stackexchange.com/questions/55287/crontab-e-then-0-every-hour-where-is-stored
The currently configured system max can be seen with the command
cat /proc/sys/fs/file-max
This value is the total for the system, not per process.
# available limit user@ubuntu:~$ ulimit -n 1024 # To increase the available limit to say 65535 user@ubuntu:~$ sudo vim /etc/sysctl.conf # add the following line to it fs.file-max = 65535 # run this to refresh with new config user@ubuntu:~$ sudo sysctl -p
# edit the following file user@ubuntu:~$ sudo vim /etc/security/limits.conf # add following lines to it * soft nproc 65535 * hard nproc 65535 * soft nofile 65535 * hard nofile 65535 root soft nproc 65535 root hard nproc 65535 root soft nofile 65535 root hard nofile 65535 # edit the following file user@ubuntu:~$ sudo vim /etc/pam.d/common-session # fedora => /etc/pam.d/login # add this line to it session required pam_limits.so # logout and login and try the following command user@ubuntu:~$ ulimit -n 65535
References
https://medium.com/@muhammadtriwibowo/set-permanently-ulimit-n-open-files-in-ubuntu-4d61064429a
https://askubuntu.com/questions/1110544/what-is-the-maximum-recommended-number-of-open-file-descriptors-on-my-vmware-whi