Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Node.js / PHP / .NET / Python

Daniel Phyo pzinwai

👨‍💻
Node.js / PHP / .NET / Python
View GitHub Profile
View gist:3364b744128779208b3457dfba05a877
#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/
@pzinwai
pzinwai / upload_to_s3.js
Last active Oct 16, 2020
Uploading files to S3 with Node.js
View upload_to_s3.js
const fs = require('fs');
const AWS = require('aws-sdk');
// Enter copied or downloaded access id and secret here
const ID = '';
const SECRET = '';
// Enter the name of the bucket that you have created here
const BUCKET_NAME = 'test-bucket-1248847363334';