Skip to content

Instantly share code, notes, and snippets.

View LevinFaber's full-sized avatar
🥝

Levin LevinFaber

🥝
  • Cologne, Germany.
  • 06:58 (UTC +01:00)
View GitHub Profile
@LevinFaber
LevinFaber / restartinterface.sh
Created December 2, 2018 02:42
Restart Interface
ip link set dev eth0 down
ip link set dev eth0 up
@LevinFaber
LevinFaber / restartinterface.sh
Created December 2, 2018 02:41
Restart Interface
ip link set dev eth0 down
ip link set dev eth0 up
@LevinFaber
LevinFaber / objecttolist.ts
Created November 26, 2018 15:31
HTML Liste aus einem Objekt
// Diese Funktion macht aus einem Objekt wie oben zu sehen eine Dom Liste. Glaubt mir.
function generateHTML(tree: object, level: number) {
const entries = Object.keys(tree);
if (entries.length === 0) return '</li>'; // Wenn das ende Eines Zweiges getroffen wird schließen wir den Eintrag und machen weiter.
const out =
'<ul>' +
entries.map((entry: string) => {
return '<li>' + entry + generateHTML(tree[entry], level + 1);
}) +
'</ul>'; // Weitere Level sind in einer weiteren unsortierten Liste.
docker volume create portainer_data
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
@LevinFaber
LevinFaber / compose.sh
Last active December 6, 2018 08:59
Install Docker
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
@LevinFaber
LevinFaber / copykey.sh
Last active November 27, 2018 09:43
Copy SSH Key to Server
ssh-copy-id -i ~/.ssh/id_rsa.pub user@host
/* <span class="c-burger is-active"></span> */
.c-burger {
display: inline-block;
width: 28px;
padding: 0;
border: 0;
border-bottom: 3px solid currentColor;
background: 0 0;
cursor: pointer;