This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOMAIN ?= mydomain.com | |
COUNTRY := IT | |
STATE := IT | |
COMPANY := Evil Corp. | |
# credits to: https://gist.github.com/fntlnz/cf14feb5a46b2eda428e000157447309 | |
# usage: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class QuickGit { | |
private $version; | |
function __construct() { | |
if(function_exists('exec')) { | |
exec('git describe --always',$version_mini_hash,$error); | |
if($error == 0 ){ | |
exec('git rev-list HEAD | wc -l',$version_number); | |
exec('git log -1',$line); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# -e means exit if any command fails | |
DBHOST=address.to.your.server | |
DBUSER=username | |
DBPASS=password # do this in a more secure fashion | |
DBNAME=DBNAME | |
GITREPO=/where/is/your/repo | |
DUMP=$GITREPO/where/you/store/dumps | |
NEW=$DUMP/schema.sql | |
OLD=$NEW.old |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up | |
GHBU_API=${GHBU_API-"https://api.github.com"} # base URI for the GitHub API | |
GHBU_GITHOST=${GHBU_GITHOST-"<CHANGE-ME>.github.com"} # the GitHub hostname (see comments) | |
# I recommend using an API token so it is easily trackable and removable. | |
# Note that you MUST have SSH keys for a user with the access to all repos set up |