Skip to content

Instantly share code, notes, and snippets.

View edinsoncs's full-sized avatar
🤖
Working from home

Edinson CS edinsoncs

🤖
Working from home
View GitHub Profile
@edinsoncs
edinsoncs / fbclid.htaccess
Created November 21, 2019 16:14 — forked from lynt-smitka/fbclid.htaccess
Remove fbclid argument from the URL in .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*?)(&?fbclid=[a-zA-Z0-9_-]+)$
RewriteRule ^(.*)$ /$1?%1 [L,NE,R=301]
</IfModule>
@edinsoncs
edinsoncs / readme.md
Created November 1, 2019 16:50 — forked from benstr/readme.md
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph

@edinsoncs
edinsoncs / sampleREADME.md
Created October 14, 2019 04:29 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@edinsoncs
edinsoncs / ComandosSymfony
Created November 7, 2017 19:47 — forked from pyjavo/ComandosSymfony
Symfony: Comandos comunes en consola
Conocer Version de Symfony instalada
php app/console --version
---- Creando Proyecto Nuevo En Symfony----
Crear una carpeta
mkdir CarpetaNueva
------------------ Composer ------------------
@edinsoncs
edinsoncs / pagination.js
Created March 31, 2017 05:28 — forked from keon/pagination.js
javascript pagination algorithm
var pagenation = function(current, total){
var list = [];
var pageLimit = 5;
var upperLimit, lowerLimit;
var currentPage = lowerLimit = upperLimit = Math.min(current, total);
for (var b = 1; b < pageLimit && b < total;) {
if (lowerLimit > 1 ) {
lowerLimit--; b++;
}
@edinsoncs
edinsoncs / README.md
Created September 4, 2016 18:27 — forked from renchap/README.md
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {
@edinsoncs
edinsoncs / nginxproxy.md
Created August 1, 2016 04:44 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@edinsoncs
edinsoncs / app.js
Created July 26, 2016 06:03 — forked from bingeboy/app.js
Upload and display image with NodeJS and Express.
/*
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, user = require('./routes/user')
, common = require('./routes/common')
, fs = require('fs')
, http = require('http')
, util = require('util')