Skip to content

Instantly share code, notes, and snippets.

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

Raihan Nismara raihan71

🏠
Working from home
View GitHub Profile
@raihan71
raihan71 / nginx.conf
Created February 16, 2021 15:50 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@raihan71
raihan71 / node_nginx_ssl.md
Created February 10, 2021 15:23 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

Mithun +91-9945610123 H.A13:28
users
id, username, email, password
roles: id, role_name, status
users_role_tbl: id, userId, roleId
Mithun H.A13:29
pages: home, about, contact
pages: id, pagename, status
3 pages can be accessed by superuser
2 pages from admin
@raihan71
raihan71 / circleci.md
Last active May 27, 2020 13:21
This is how I implemented circleci with vps

Steps to configure circle with vps

CircleCI >> Section

  • Go to circleci[dot]com
  • then login using your favorite git services
  • choose project you want setup
  • start configure circle.yml it will create .circleci/config.yml
  • then you'll see the test failed don't panic becuase it's normal at first

Windows 10 Fall Creators Update - Installing Node.js on Windows Subsystem for Linux (WSL)

Windows just released the windows subsystem for linux feature to the public with its latest windows fall creator update, if you are not familiar with this feature it allows you to run linux binaries natively on windows - F.A.Q.

Enabling WSL

The feature is not enabled by default and you need to activate it, you can do it via powershell (with admin rights):

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
@raihan71
raihan71 / css-advanced.md
Created January 7, 2020 08:08
This is about my notes and gists about the course of Academind "CSS - The Complete Guide 2020"

Bismillah

@raihan71
raihan71 / order-status.ts
Created October 31, 2019 04:28
Order status of marketplace
export class OrderStatus {
static get(status:string):string {
let ostatus:string;
switch (status) {
case "pending": {
ostatus = 'Pesanan Pending';
break;
}
@raihan71
raihan71 / js-advanced.md
Last active December 31, 2020 04:15
This is about my notes and gists about course from Brad Traversy - "Modern JS From The Beginning"

Modern javascript from the beginning

Useful Syntax

  • console.table(data) = visualized data with ta
  • typeof data = get to know type data of the variable
  • Number(string) = convert number any type to type of number
  • String(number) = convert number any type to type of string
  • toFixed(decimal) = to add custom decimal number
  • parseInt(string or number) = just parse to the integer
  • parseFloat(string or number) = parse to the float type
@raihan71
raihan71 / nginx.conf
Created October 4, 2019 06:26 — forked from calebwoods/nginx.conf
Sample Nginx config for deployment of Angular.js app
server { listen 80;
server_name example.com;
access_log /var/log/example.com/nginx.access.log;
error_log /var/log/example.com/nginx.error.log;
root /var/www/apps/example.com/public;
charset utf-8;
location / {
rewrite ^ https://$host$request_uri? permanent;
}
@raihan71
raihan71 / readme.md
Created August 7, 2019 06:05 — forked from huenisys/readme.md
encode private RSA key for gitlab error: "Enter passphrase for /dev/fd/63" error

Encode your private RSA key

$ cat my_private_key | base64 -w0 
# -w0 to avoid newlines

Add the base64 string to your project variables. Use it in your .gitlab-ci.yml