Skip to content

Instantly share code, notes, and snippets.

View SteveDevOps's full-sized avatar
😎
werkin'

Steve Duys SteveDevOps

😎
werkin'
View GitHub Profile
@chabala
chabala / using-google-takeout.md
Last active March 25, 2024 00:18
Merge and extract tgz files from Google Takeout

Recently found some clowny gist was the top result for 'google takeout multiple tgz', where it was using two bash scripts to extract all the tgz files and then merge them together. Don't do that. Use brace expansion, cat the TGZs, and extract:

$ cat takeout-20201023T123551Z-{001..011}.tgz | tar xzivf -

You don't even need to use brace expansion. Globbing will order the files numerically:

$ cat takeout-20201023T123551Z-*.tgz | tar xzivf -
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active April 12, 2024 17:23
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@cmitu
cmitu / gamelist.py
Last active March 14, 2023 17:08
Python script to export Emulationstation's game list to an Excel (xlsx) file.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import xml.etree.ElementTree as et
import logging as log
import os.path
import fnmatch
import argparse
import xlsxwriter
from datetime import datetime as dt
@Evalle
Evalle / gist:7b21e0357c137875a03480428a7d6bf6
Created October 20, 2017 12:08
How to configure Docker to use external DNS server
Either via
$ docker run --dns 10.0.0.2 busybox nslookup google.com
or edit your /etc/docker/daemon.json to have something like:
{
"dns": ["10.0.0.2", "8.8.8.8"]
}
then restart docker service
@0xjac
0xjac / private_fork.md
Last active April 18, 2024 07:04
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@kshcherban
kshcherban / auto-update-terraform
Last active April 23, 2020 19:14
Bash script to auto update terraform on linux
#!/bin/bash
INSTALL_DIR="${1:-/opt/terraform}"
URL="https://releases.hashicorp.com/terraform"
VER="$(curl -sL $URL | grep -v beta | grep -Po "_(\d*\.?){3}" | sed 's/_//' | sort -V | tail -1)"
ZIP="terraform_${VER}_linux_amd64.zip"
echo "* Downloading ${URL}/${VER}/terraform_${VER}_linux_amd64.zip"
curl -s ${URL}/${VER}/terraform_${VER}_linux_amd64.zip -o ${INSTALL_DIR}/${ZIP}
@larsar
larsar / shared_folder_centos_virtualbox.txt
Created January 27, 2012 08:04
Mount shared folder on CentOS in VirtualBox
# The VirtualBox documentation[1] for how to install guest additions
# for Linux on a virtual host is somewhat messy. So here is what
# I did to make it work.
# Install the packages required
yum update
yum install gcc kernel-devel make
reboot
@earlonrails
earlonrails / fizzbuzz.sh
Last active November 25, 2022 11:15
Fizz Buzz in bash! Hooray!
#!/bin/bash
x=1
while [ $x -le 100 ]
do
if [[ 0 -eq "($x%3) + ($x%5)" ]]
then
# Check if divide by 3 & 5 #
echo "fizz buzz"
elif [[ 0 -eq "($x%5)" ]]
then