Skip to content

Instantly share code, notes, and snippets.

View andresmgsl's full-sized avatar
🔥
Building things

Andres Guerrero andresmgsl

🔥
Building things
View GitHub Profile
@andresmgsl
andresmgsl / cors.nginxconf
Created February 17, 2017 02:20 — forked from pauloricardomg/cors.nginxconf
Nginx configuration for CORS-enabled HTTPS proxy with origin white-list defined by a simple regex
#
# Acts as a nginx HTTPS proxy server
# enabling CORS only to domains matched by regex
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/
#
# Based on:
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html
# * http://enable-cors.org/server_nginx.html
#
server {
@andresmgsl
andresmgsl / letsencrypt_2016.md
Created January 29, 2017 19:30 — forked from cecilemuller/letsencrypt_2020.md
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 mydomain.com to be served from /var/www/mydomain, and challenges will be served from /var/www/letsencrypt.

# Source: http://choyan.me/oh-my-zsh-elementaryos/
sudo apt-get update && sudo apt-get install -y curl vim git zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | bash
sudo chsh -s $(which zsh) $(whoami)
db.images.find({}).forEach(function(doc){
var regexp = /(.*)\.[^.]+$/;
var thumbName = doc.name.split('.').reverse().slice(1);
db.images.update(
{number:doc.number},
{ $set:
{"path": {
"url" : "assets/images/users/" + doc.username + "/pieces/" + doc.number + "/" + doc.name,
"thumb": "assets/images/users/" + doc.username + "/pieces/" + doc.number + "/" + thumbName + "_thumb.jpg"}
}
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip)
@andresmgsl
andresmgsl / SimpleHTTPServer
Created May 13, 2015 13:36
Servidor python
python -m SimpleHTTPServer 8000
@andresmgsl
andresmgsl / setxkbmap
Created May 13, 2015 13:36
Cambiar idioma teclado latam
sudo setxkbmap latam