Skip to content

Instantly share code, notes, and snippets.

Building things

Andres Guerrero andresmgsl

Building things
View GitHub Profile
andresmgsl /
Last active Jun 21, 2020 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
andresmgsl / timeout.html
Created Oct 19, 2019 — forked from kumikoda/timeout.html
A simple example demonstrating how setTimeout(fn, 0) can be useful. This gist illustrates the answer given by DVK's on stackoverflow.
View timeout.html
<script type="text/javascript" src=""></script>
<button id='do'> Do long calc!</button>
<div id='status'></div>
<div id='result'></div>
$('#do').on('click', function(){
andresmgsl / .htaccess
Created Jul 23, 2018 — forked from julianpoemp/
Optimal .htaccess configuration for an Angular 5 App in production
View .htaccess
# place this file in the same folder as your index.html on your server
# make sure to set the right base href attribute in your index.html
# this file ist hosted on GithubGist:
# to index.html to make routing work in production
<IfModule mod_rewrite.c>
RewriteEngine on


When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
View gist:48314f4391b1bf4ddecbcbb8557287c6
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
andresmgsl / gist:78d7226602ca09bb828cdc3e4e953a68
Created Jan 27, 2018 — forked from tamoyal/gist:10441108
Create super user and database user in Mongo 2.6
View gist:78d7226602ca09bb828cdc3e4e953a68
# Create your superuser
$ mongo
> use admin
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]})
> exit
# Alias for convenience (optional and at your own risk)
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile
$ source ~/.bash_profile
andresmgsl / cors.nginxconf
Created Feb 17, 2017 — forked from pauloricardomg/cors.nginxconf
Nginx configuration for CORS-enabled HTTPS proxy with origin white-list defined by a simple regex
View cors.nginxconf
# Acts as a nginx HTTPS proxy server
# enabling CORS only to domains matched by regex
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/
# Based on:
# *
# *
server {
andresmgsl /
Created Jan 29, 2017 — forked from cecilemuller/
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two modes when you don't want Certbot to edit your configuration:

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80) to renew certificates.

In the following, we're setting up to be served from /var/www/mydomain, and challenges will be served from /var/www/letsencrypt.

# Source:
sudo apt-get update && sudo apt-get install -y curl vim git zsh
curl -L | bash
sudo chsh -s $(which zsh) $(whoami)