Skip to content

Instantly share code, notes, and snippets.

@changux
changux / backup-gmail-account.sh
Created August 15, 2018 16:10
Script to execute a gmail backup and sync to another account
#!/bin/bash
# Add cron to execute every day
# 0 12 * * * cd ~/my/backup/script && ./backup-gmail-account.sh >> /var/log/script_output.log 2>&1
# sudo pip install gmvault
#
BACKUPMAIL=$HOME/gmvault-db
#
# Initial setup
if [ ! -d "$BACKUPMAIL" ]; then
/usr/local/bin/gmvault sync main-account@gmail.com # or gapps mail account

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active May 5, 2024 10:12
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@sftsk
sftsk / calendarpi.md
Last active May 12, 2021 21:19
Raspberry Pi Google Calendar Screen

Using a raspberry pi to display Google Calendars

This explains the set up of our very basic status screen to displays Google calendars here at booncon.

Install the raspberry pi

Download and put the most current https://www.raspberrypi.org/downloads/raspbian/ image to an SD Card. On OSX that works great with http://www.tweaking4all.com/hardware/raspberry-pi/macosx-apple-pi-baker/, just use the restore option and select the unzipped image file.

Set up the operation system basics

After the first boot, the raspi-config utility should load up.

@tx0dev
tx0dev / he-ddns.sh
Created February 22, 2013 06:30
Updater for Hurricane Electric for their Dynamic dns service. IPv6 updates are NOT enable at the moment.
#!/bin/bash
# HOSTS
HOSTS="example.com foo.example.com"
# HOSTS PASSWORD
# Because I'm lazy, it needs to be the same for all hosts
HOST_KEY="YOUR_PASSWORD"
# Get Current IPs
@changux
changux / gist:2321971
Created April 6, 2012 18:38
Check Flashback Trojan
display dialog "Lets go to check two simple values, if the result is not equal to OK, run some antivirus or do your job with the terminal app. Also, check http://goo.gl/3FWfA" with icon stop with title "Simple Flashback Trojan detect tool"
try
set test1 to do shell script "defaults read /Applications/Safari.app/Contents/Info LSEnvironment > /tmp/nada 2>&1; cat /tmp/nada | grep -i not"
set test1 to result
if test1 contains "does not exist" then
display dialog "Step 1: OK" with icon note
do shell script "rm -f /tmp/nada"
else
@changux
changux / gist:2321715
Created April 6, 2012 18:07
Check Flashback Trojan
display dialog "Lets go to check two simple values, if the result is not equal to OK, run some antivirus or do your job with the terminal app. Also, check http://goo.gl/3FWfA" with icon stop with title "Simple Flashback Trojan detect tool"
try
set test1 to do shell script "defaults read /Applications/Safari.app/Contents/Info LSEnvironment > /tmp/nada 2>&1; cat /tmp/nada | grep -i not"
set test1 to result
if test1 contains "does not exist" then
display dialog "Step 1: OK" with icon note
do shell script "rm -f /tmp/nada"
else
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#