Skip to content

Instantly share code, notes, and snippets.

View ebal's full-sized avatar
💻
random typing

Evaggelos Balaskas ebal

💻
random typing
View GitHub Profile
@ebal
ebal / BoostNote-to-md.Converted.py
Created December 3, 2022 14:26
a simple BoostNote cson converted to MarkDown format
#!/usr/bin/env python
import os
import sys
import cson
path = sys.argv[1]
i=0
for x in os.listdir(path):
@ebal
ebal / gitlab.run.sh
Last active December 2, 2022 20:23
Run GitLab-Runner on your system for local builds
#!/bin/bash
# This will be the directory to save our artifacts
TEMPDIR=$(mktemp -p . -d)
# You can choose to run a different job
[[ -z "$1" ]] && JOB="run-build" || JOB="$1"
# GitLab Runner - docker
gitlab-runner exec docker \
@ebal
ebal / btrfsSnapshot.sh
Last active November 7, 2022 08:09
BTRFS: Automatic Snapshots Script
#!/bin/bash
set -e
# ebal, Mon, 07 Nov 2022 08:49:37 +0200
## 0 0 * * Fri /usr/local/bin/btrfsSnapshot.sh
# paths MUST end with '/'
btrfs_paths=("/" "/home/" "/opt/")
timestamp=$(date +%Y%m%d_%H%M%S)
@ebal
ebal / cloud-init.sh
Created November 18, 2018 10:10
Cloud-init example using a Generic Cloud CentOS-7 on a libvirtd qmu/kvm lab
#!/bin/sh
if [ "$EUID" -ne 0 ]; then
echo -e "\nPlease run as root\neg. sudo $0 \n"
exit
fi
GITHUB_USERNAME="ebal"
cd `mktemp -d`
@ebal
ebal / net.sh
Created February 14, 2016 20:01
Create a new bridge interface, add ethernet and connect to wireless access point with isolation between networks.
!/bin/sh
ip link add br0 type bridge
ip link set br0 up
ip link set eth0 up
ip link set eth0 master br0
ip addr add 10.10.10.10/24 dev br0
ip route add default via 10.10.10.1 dev br0