Skip to content

Instantly share code, notes, and snippets.

@sanrandry
sanrandry / node_nginx_ssl.md
Created July 13, 2020 11:18 — 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

@sanrandry
sanrandry / ubuntu_server_star_configuration.md
Last active August 2, 2020 16:55
ubuntu server configuration
@sanrandry
sanrandry / Nuxt.js .htaccess
Created August 1, 2020 09:31 — forked from mariojankovic/Nuxt.js .htaccess
.htaccess for Nuxt.js under apache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
@sanrandry
sanrandry / sample.md
Created August 1, 2020 16:43 — forked from bradtraversy/sample.md
Markdown Cheat Sheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic

@sanrandry
sanrandry / loopback_spa_deployement.md
Last active August 4, 2020 04:59
loopback spa deployemnt
@sanrandry
sanrandry / nginx_sites-available_folder_not_found.md
Last active October 15, 2024 19:04
nginx sites-available folder not found

nginx sites-available folder not found

create the sites-available and sites-enabled folder

sudo mkdir /etc/nginx/sites-available
sudo mkdir /etc/nginx/sites-enabled

edit the http block inside /etc/nginx/nginx.conf and add this line

include /etc/nginx/sites-enabled/*;
@sanrandry
sanrandry / tets encribpt dist tmp.md
Created August 4, 2020 05:02
tets encribpt dist tmp
  1. https://certbot.eff.org/

sudo apt-get update sudo apt-get install software-properties-common sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install python-certbot-nginx

  1. Auto, works when you have one virtual server on nginx
@sanrandry
sanrandry / wordpress theme starter.md
Last active August 8, 2020 09:58
wordpress theme starter

wordpress theme starter

create a the theme folder

create index.php and style.css

add comment to style.css

cpoy the comment in the index.css in the default theme to your index.css and edit it.

try to loop the post on the index.php page

<!DOCTYPE html>
<html lang="en">
@sanrandry
sanrandry / rakitra_note.md
Last active August 19, 2020 08:03
rakitra note
@sanrandry
sanrandry / wordpress.md
Last active October 29, 2020 08:55
word press note

create setup function

your_theme_name_setup() {

}
add_action('after_setup_theme', 'rakitra_janga_setup');

include assets

add those line of code to function.php