git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
There are two main modes to run the Let's Encrypt client (called Certbot):
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.
| var FB = require('fb'); | |
| FB.api('oauth/access_token', { | |
| client_id: process.env.FACEBOOK_APP_ID, | |
| client_secret: process.env.FACEBOOK_SECRET, | |
| grant_type: 'client_credentials' | |
| }, function(res) { | |
| if (!res || res.error) { | |
| console.log('error occurred when getting access token:', res && res.error); | |
| return; |
| // Run PostgreSQL server: | |
| // docker run -e POSTGRES_PASSWORD="" -p 5432:5432 postgres | |
| // Monitor running processes: | |
| // watch -n 1 'echo "select pid,query_start,state,query from pg_stat_activity;" | psql -h localhost -U postgres | |
| // | |
| // For all handlers, call to db takes 5 seconds, | |
| // | |
| // Three endpoints: | |
| // - "/" - take 5 seconds | |
| // - "/ctx" - take 1 seconds, due to 1 second cancellation policy |
| $('input[type="checkbox"]').bind('change', function() { | |
| var $checkbox = $(this); | |
| var id = this.id + '-hidden'; | |
| if ($checkbox.is(':checked')) { | |
| $('#' + id).detach(); | |
| } else { | |
| var name = $checkbox.attr('name'); | |
| $checkbox.before('<input type="hidden" name="'+ name +'" value="0" id="'+ id +'">'); | |
| } |
| font-size:10px; | |
| font-size:0.625rem; | |
| font-size:11px; | |
| font-size:0.6875rem; | |
| font-size:12px; | |
| font-size:0.75rem; | |
| font-size:13px; |
| # set DOMAIN_NAME to your domain, example "google.com" | |
| # server { | |
| set $https_redirect 0; | |
| if ($http_host = 'www.DOMAIN_NAME') { | |
| set $https_redirect 1; | |
| } |
| # You need some sort of indication that an Ajax transaction exists. jQuery.active doesn't seem to do the | |
| # trick, so we use the following JS (well, we use CoffeeScript, but whatever) that gets inserted into | |
| # our application. | |
| # | |
| #$(function() { | |
| # var body, doc; | |
| # body = $('body'); | |
| # doc = $(document); | |
| # doc.ajaxStart(function() { | |
| # return body.addClass('ajax-in-progress').removeClass('ajax-quiet'); |
| # This class shows uses version 0.9.x of the ruby google-api-client gem circa July 2016 | |
| # to query the Google Play subscription API. | |
| # | |
| # If using an older version of the google-api-client gem (ie. version 0.8.x), instead refer to: | |
| # https://gist.github.com/jkotchoff/e60fdf048ec443272045/e3e2c867633900d9d6f53de2de13aa0a0a16bb03 | |
| # | |
| # Sample usage: | |
| # | |
| # package_name = 'com.stocklight.stocklightapp' | |
| # product_id = 'com.stocklight.stocklight.standardsubscription' |