This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Text.Json; | |
using System.Text.Json.Serialization; | |
string json = """ | |
{ | |
"2024-03-30": { | |
"comments": { | |
"total": 0 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ii samba 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 SMB/CIFS file, print and login server for Unix | |
ii samba-common 2:4.10.9+karoshi-1~linuxschools1+bionic1 all common files used by both the Samba server and client | |
ii samba-common-bin 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 Samba common files used by both the server and the client | |
ii samba-dbg 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 Samba debugging symbols | |
ii samba-dsdb-modules 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 Samba Directory Services Database | |
ii samba-libs:amd64 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 Samba core libraries | |
ii samba-vfs-modules 2:4.10.9+karoshi-1~linuxschools1+bionic1 amd64 Samba Virtual FileSystem plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -f /var/run/reboot-required ]; then | |
echo '*** System restart required ***' | |
else echo 'Reboot not necessary.' | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://stackoverflow.com/questions/5735666/execute-bash-script-from-url | |
bash <(curl -s http://mywebsite.com/myscript.txt) | |
# http://stackoverflow.com/questions/4642915/passing-parameters-to-bash-when-executing-a-script-fetched-by-curl | |
curl http://foo.com/script.sh | bash -s arg1 arg2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Mounting the share is a 2 stage process: | |
# 1. Create a directory that will be the mount point | |
# 2. Mount the share to that directory | |
#Create the mount point: | |
mkdir share_name | |
#Mount the share: | |
mount_smbfs //username:password@server.name/share_name share_name/ |