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
@daxdax89
daxdax89 / gist:d64b75184657d759d226a4b7799d0ca7
Created January 11, 2021 16:57
Secret JS Usage Example
// Use this code snippet in your app.
// If you need more information about configurations or implementing the sample code, visit the AWS docs:
// https://aws.amazon.com/developers/getting-started/nodejs/
// Load the AWS SDK
var AWS = require('aws-sdk'),
region = "us-east-1",
secretName = "project-name-api-key",
secret,
decodedBinarySecret;

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

### Keybase proof
I hereby claim:
* I am daxdax89 on github.
* I am daxdax89 (https://keybase.io/daxdax89) on keybase.
* I have a public key ASBWE42qcuUe_9rrXmIJlsfYtPpjZwLJVQS3dYrsO1P-2wo
To claim this, I am signing this object:
@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;
}
Steps--
1. Connect ssh to ec2 instance.
2. Become the super user after executing the command
sudo -s
3. Type the following commands to install vncserver:
sudo apt-get install ubuntu-desktop

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

Javascript libraries
Particles.js — A library for creating beautiful floating particles on a web page
Three.js — A library for creating 3d objects and spaces on a web page
Fullpage.js — Easy to implement full page scroll feature
Typed.js — Typewriter effect
Waypoints.js — Trigger a function when you scroll to an element
@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)