Skip to content

Instantly share code, notes, and snippets.

View giuliobosco's full-sized avatar

Giulio Bosco giuliobosco

View GitHub Profile
@mjurincic
mjurincic / setup.sh
Created February 6, 2019 10:06 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@matteoforni
matteoforni / markdown-hf-samt.txt
Last active February 6, 2019 10:09 — forked from giuliobosco/markdown-hf-samt.txt
SAMT Header and Footer in markdown with atom.io package: markdown-themeable-pdf
Make SAMT (Scuola Arti e Mestieri Trevano) documentations using markdown and convert them to pdf.
Install the atom package markdown-themeable-pdf, then open the folder of the package:
~/.atom/markdown-themeable-pdf/ and copy inside your logo (must be a square logo).
Then open the file "header.js" in the markdown-themeable-pdf foler and set the "height" to "2cm" and the "contents" to:
<div style="margin:0;"><div style="float:left;border:1px solid black;padding:2px 2px 0 2px;height:35px;z-index:1;background-color:white;"><img src="samt.png" style="width:33px"></div><div style="float:right;border:1px solid black;padding:4px 4px 0 4px;height:33px;font-size:11px;text-align:center;z-index:1;background-color:white;color:black;">Pagina:<br>{{page}} / {{pages}}</div><div style="overflow:auto;border-top:1px solid black;border-bottom:1px solid black;padding:2px 4px 2px 0;height:33px;font-size:11px;"><div style="width:100%;text-align:center;"><span style="color:black;">SAMT - Sezione Informatica</span><br><div style=
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active July 20, 2024 14:39
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@rzrbld
rzrbld / ssh-loop-remove.sh
Last active September 2, 2021 09:54
bash script to ssh multiple servers in a loop
#!/bin/bash
for server in $(cat hosts.txt); do
IP=`echo "$server" | awk 'BEGIN {RS = "|"}; END {print $1}'`;
HOST=`echo "$server" | awk 'BEGIN {FS = "|"}; END {print $1}'`;
USER=`echo $HOST | sed 's/tst-centos-//g;s/\-.//g;'`;
echo "$HOST($IP)"
echo $USER
ssh -nt $USER@$IP -i ssh/$USER 'sudo yum -y remove test-pkg && sudo rm -rf /var/lib/test'
done