Skip to content

Instantly share code, notes, and snippets.

View JoshOldenburg's full-sized avatar

Josh Oldenburg JoshOldenburg

View GitHub Profile
@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
Hint: Replace USER with your Aegir Octopus system (not ftp) username.
Your Aegir system username is the same as your ftp username, minus .ftp.
1. Upload or rsync full drupal root of your site to static/custom/name
2. Chmod everything with: chmod -R 775 static/custom/name
Chmod files with: chmod -R 777 static/custom/name/sites/default/files
3. Add platform in Aegir using full system path of static/custom/name
so it will be (in this case) /data/disk/USER/static/custom/name
location ~* /(/files/)/ {
rewrite ^/sites/(.*)/files/(.*)$ /sites/$host/files/$2 last;
try_files $uri @drupal;
}
@mbbx6spp
mbbx6spp / .gitconfig
Last active October 20, 2024 14:32
Susan Potter's .gitconfig file from November 2007 blog post. Updated since November 2007 with new aliases or options.
# Migrating my old .gitconfig blog post from 2007 to here so I can update it easier.
# Original URL:
# https://www.susanpotter.net/snippets/my-.gitconfig-.tigrc-files/
[user]
name = Susan Potter # make sure you change this
email = [email protected] # make sure you change this
[color]
diff = auto
status = auto
branch = auto