Skip to content

Instantly share code, notes, and snippets.

View soyfrien's full-sized avatar

Louis Waweru soyfrien

View GitHub Profile
using System.Text.Json;
using System.Text.Json.Serialization;
string json = """
{
"2024-03-30": {
"comments": {
"total": 0
},
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
@soyfrien
soyfrien / rcheck.sh
Last active January 2, 2022 18:52
rcheck.sh: Answers question: restart required?
#!/bin/bash
if [ -f /var/run/reboot-required ]; then
echo '*** System restart required ***'
else echo 'Reboot not necessary.'
fi
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active November 2, 2024 12:39
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
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 && \
@n0ts
n0ts / remote_bash.sh
Created May 1, 2014 06:35
execute bash script from remote site
# 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
@natritmeyer
natritmeyer / mount_smbfs.sh
Created September 19, 2013 09:40
How to mount and unmount a SMB share on Mac OS X (using mount_smbfs)
#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/