Skip to content

Instantly share code, notes, and snippets.

View abourazanis's full-sized avatar

Anastasios Bourazanis abourazanis

View GitHub Profile
@abourazanis
abourazanis / .gitlab-ci.yml
Created February 26, 2018 12:14 — forked from DennisAlund/.gitlab-ci.yml
Gitlab CI configuration for the Medium article "Deploying Django to Google App Engine with Gitlab CI" -- https://medium.com/evenbit/deploying-django-to-google-app-engine-with-gitlab-ci-541c0dc67a12
image: python:2.7
.deploy_template: &global_deploy_def
stage: deploy
before_script:
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
- apt-get update && apt-get install google-cloud-sdk
after_script:
- source .gitlab-ci.env
@abourazanis
abourazanis / psql-with-gzip-cheatsheet.sh
Created May 31, 2017 08:03 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database
@abourazanis
abourazanis / .htaccess
Created April 21, 2017 07:45 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/