Skip to content

Instantly share code, notes, and snippets.

View mmolucio's full-sized avatar
🎯
Focusing

Guillermo Lucio mmolucio

🎯
Focusing
View GitHub Profile
@mmolucio
mmolucio / letsencrypt_2017.md
Last active September 7, 2017 17:12 — 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 main modes to run the Let's Encrypt client (called Certbot):

  • 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).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

@mmolucio
mmolucio / matrix-synapse.conf
Created September 27, 2017 14:03 — forked from Tristor/matrix-synapse.conf
Nginx reverse-proxy config for Matrix Synapse server
server {
listen 80;
listen [::]:80;
server_name matrix.tristor.ro;
location '/.well-known/acme-challenge' {
default_type "text/plain";
allow all;
root /var/www/matrix.tristor.ro/public/;
}
@mmolucio
mmolucio / delete-git-recursively.sh
Created July 16, 2018 01:00 — forked from facelordgists/delete-git-recursively.sh
Recursively remove .git folders
( find . -type d -name ".git" && find . -name ".gitignore" && find . -name ".gitmodules" ) | xargs rm -rf
@mmolucio
mmolucio / ShouldNotUpdate.js
Created January 28, 2019 01:31 — forked from NoamELB/ShouldNotUpdate.js
component that should not update
class ShouldNotUpdate extends React.Component {
constructor(props) {
super(props);
this.counter = 0;
}
shouldComponentUpdate(nextProps, nextState) {
return this.props.children !== nextProps.children;
}

Keybase proof

I hereby claim:

  • I am mmolucio on github.
  • I am memolucio (https://keybase.io/memolucio) on keybase.
  • I have a public key ASC6OmeXCTsp-ej99MKkM5ASAXbOgNzwleUHiuyerckndAo

To claim this, I am signing this object:

@mmolucio
mmolucio / GitHub curl.sh
Created February 6, 2019 17:30 — forked from Integralist/GitHub curl.sh
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \
--header 'Accept: application/vnd.github.v3.raw' \
--remote-name \
--location https://api.github.com/repos/owner/repo/contents/path
# Example...
TOKEN="INSERTACCESSTOKENHERE"
OWNER="BBC-News"
REPO="responsive-news"
@mmolucio
mmolucio / gh-dl-release
Created February 6, 2019 23:46 — forked from deevus/gh-dl-release
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@mmolucio
mmolucio / README.md
Created February 11, 2019 22:02 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@mmolucio
mmolucio / .gitignore
Created June 21, 2019 22:27 — forked from iffy/.gitignore
Example using electron-updater with `generic` provider.
node_modules
dist/
yarn.lock
wwwroot
@mmolucio
mmolucio / README.md
Created July 12, 2019 04:15 — forked from BoGnY/README.md
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)

Requirements

  • Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
  • Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell (Make sure your local version of Git is at least 2.0, otherwise Git don't have support for automatically sign your commits)
  • Verify