Skip to content

Instantly share code, notes, and snippets.

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

DaX daxdax89

🏠
Working from home
View GitHub Profile
@daxdax89
daxdax89 / AWS RDS Postgres Export to Local
Last active October 19, 2021 08:58 — forked from syafiqfaiz/how-to-copy-aws-rds-to-local.md
How to copy production database on AWS RDS(postgresql) to local development database.
1. Change your database RDS instance security group to allow your machine to access it.
* Add your ip to the security group to acces the instance via Postgres.
2. Make a copy of the database using pg_dump
* ```$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>```
* you will be asked for postgressql password.
* a dump file(.sql) will be created
3. Restore that dump file to your local database.
* but you might need to drop the database and create it first
* ```$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>```
* the database is restored

Set the base image to Ubuntu must be first instruction - use docker search to find images

FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)

Set the maintainer info

@daxdax89
daxdax89 / .htaccess
Created January 16, 2020 16:54 — forked from jdevalk/.htaccess
These three files together form an affiliate link redirect script.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
</IfModule>
@daxdax89
daxdax89 / 1-mixin.scss
Created September 6, 2019 07:23 — forked from danro/1-mixin.scss
SCSS hover-active mixin
@mixin hover-active {
&:hover {
.no-touch & {
@content;
}
}
&:active {
.touch & {
@content;
}

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@daxdax89
daxdax89 / webdev_online_resources.md
Created August 7, 2018 12:21 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)