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
| export interface Bytes { | |
| value: number; | |
| unit: string; | |
| } | |
| /** | |
| * Convert a number of bytes into a human-readable string (e.g. "1.23 MB") | |
| * @param bytes | |
| * @param decimals How many decimal places to include | |
| */ |
| /** | |
| * Converts a number to a formatted string with k, m, etc. | |
| * | |
| * @param {number} num The number to format. | |
| * @param {number} [digits=1] The number of decimal places to display. Defaults to 1. | |
| * @returns {string} The formatted string. | |
| */ | |
| function formatNumber(num: number, digits: number = 1): string { | |
| if (typeof num !== 'number' || isNaN(num)) { | |
| return 'Invalid input: Not a number'; |
| /** | |
| * Returns an easy-to-read Date format | |
| * @param timestamp Timestamp in String on Number | |
| * @param full Return full Date | |
| * @return formatted String | |
| */ | |
| export function formatDate(timestamp: number | string, full?: boolean): string { | |
| if (!timestamp) return ''; | |
| const date = toDate(timestamp); |
| /*tooltip*/ | |
| [data-tooltip]:not([data-tooltip=""]) { | |
| position: relative; | |
| } | |
| [data-tooltip]:not([data-tooltip=""])::before { | |
| content: attr(data-tooltip); | |
| position: absolute; | |
| bottom: 100%; | |
| left: 50%; |
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; |