Skip to content

Instantly share code, notes, and snippets.

View andre3k1's full-sized avatar
🏠
Working from home

Andre Garrigo andre3k1

🏠
Working from home
View GitHub Profile
@MikeRogers0
MikeRogers0 / backup-to-s3.sh
Last active May 19, 2020 15:33
A method of backing up your website to Amazon S3.
#!/bin/bash
## Email Variables
EMAILDATE=`date --date="today" +%y-%m-%d`
EMAIL="you@yourdomain.com"
SUBJECT="[servername] Backup Script Started! - "$EMAILDATE
EMAILMESSAGE="/tmp/emailmessage1.txt"
echo "Just to let you know that the backup script has started."> $EMAILMESSAGE
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
@timmmmyboy
timmmmyboy / github-push.sh
Created November 22, 2013 02:42
Script to sync all changes between DokuWiki and GitHub
cd /home/username/public_html/data/pages/
git pull
git add -A
git commit -m "Dokuwiki external edit"
git push origin master
@andre3k1
andre3k1 / Open iTerm2 tab from Finder
Last active March 1, 2023 17:01 — forked from eric-hu/Open iterm tab here
Open iTerm2 tab from Finder here
#####
## Open iTerm2 tab from Finder
##
## Adapted from these sources:
## http://peterdowns.com/posts/open-iterm-finder-service.html
## https://gist.github.com/cowboy/905546
## Modified to work with files as well, cd-ing to their container folder
##
## Usage Instructions:
## 1) Open Automator
@kevyin
kevyin / gist:5b00a17bf10bfee5da778b6acfa40545
Created October 4, 2016 01:14
Download and install nbr2mp4
wget http://support.webex.com/supportutilities/nbr2mp4.tar
tar -xvf nbr2mp4.tar ./
bash ./nbr2mp4.sh
cd nbr2_mp4/
# find missing libraries
ldd nbr_play | grep not
# install 32bit versions
sudo apt-get install libpangox-1.0-0:i386 libpangoxft-1.0-0:i386
@davidicus
davidicus / gitCheatsheet.txt
Created February 3, 2017 20:58
A list of git commands
Git cheat sheet
setup
git help - will provide instructions
git config —global user.name “David Conner” - set the global user name
git config —global user.email rdconner@us.ibm.com - set the global email
git config —global color.ui true - turns on a colorful ui for the command line
@andre3k1
andre3k1 / regex_patterns.md
Created July 23, 2018 16:19
Regular Expressions - Special Character Definitions

Regular Expressions

The following should be escaped if you are trying to match that character

\ ^ . $ | ( ) [ ]
* + ? { } ,

Special Character Definitions

@oseme-techguy
oseme-techguy / Correct_GnuPG_Permission.sh
Last active June 9, 2024 07:46
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg