Skip to content

Instantly share code, notes, and snippets.

View AlexBezuska's full-sized avatar

Alex Bezuska AlexBezuska

  • Louisville, Kentucky (KY)
View GitHub Profile
@AlexBezuska
AlexBezuska / mysqldump from remote server into git repo
Last active August 29, 2015 14:15
mysql remote server backup script (with git)
#!/bin/sh
SERVER="servername"
USER="username"
PASSWORD="password"
NOW=$(date +"%m-%d-%Y %r")
DB="databasname"
COMMITMSG="mysql dump"
ssh $SERVER "mysqldump --verbose -u $USER --pass=$PASSWORD $DB" > $DB.sql
@AlexBezuska
AlexBezuska / gist:4a37c2dbbb2b1b970853
Created February 20, 2015 01:42
exiftool photo rename script
exiftool '-FileName<DateTimeOriginal' -d "%Y-%m-%d %H.%M.%S%%-c.%%e" /dir/
@AlexBezuska
AlexBezuska / gist:3180dd26ade437aa0f14
Created February 20, 2015 16:18
Flatten directory with Gnu CP
if you don't have Gnu copy:
brew install coreutils
Flatten:
Specific file type only
find SOURCE -name '*.mp3' -exec gcp -v --backup=numbered {} DESTINATION \;
All files
find SOURCE -type f -exec gcp -v --backup=numbered {} DESTINATION \;
@AlexBezuska
AlexBezuska / gist:7ed959346898f927a8a2
Last active August 29, 2015 14:18
MySQL CheatSheet
log into mysql
#################################
$ mysql -u root -p
list all databses
#################################
mysql> show databases;
list all users
#################################
sudo chown apache /ivy/gamedevlou/wp-content/
[
{
"ALL": {
"favorite": "favourite",
"color": "colour"
}
},
{
"AU": {
"personalized": "personalised",
@AlexBezuska
AlexBezuska / post-jamLD32.md
Last active August 29, 2015 14:19
Post LD32 jam checklist
@AlexBezuska
AlexBezuska / Tiled Map Editor json export example
Created May 19, 2015 18:55
Tiled Map Editor json export example
{ "height":10,
"layers":[
{
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 3, 3, 3, 3, 3, 0, 0, 3, 3, 3, 0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":10,
"name":"Tile Layer 1",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":18,