with PM2 & Nginx
as a root, run below commands on server:
# adduser tomy
/****************************** | |
HSBC Personal Statement to CSV | |
v0.5 | |
Copyright: Benjie Gillam (2012) | |
License: WTFPL v2.0 ( http://en.wikipedia.org/wiki/WTFPL ) | |
Instructions: | |
Add the following bookmarklet to your browser: |
// ugly way | |
var obj = { | |
a: 1, | |
b: 2, | |
c: 3, | |
[Symbol.iterator]() { | |
var keys = Object.keys(this); | |
var idx = 0; | |
return { |
Install on Mac using brew install tmux
and start with tmux
See help (list of commands) with Control-b ?
key combination. Leave help view by pressing q
key.
From now on use Control-b
(aka C-b
) to start all tmux commands (C-b
is called command prefix
and can be changed, see tmux.config
options).
"use strict"; | |
/** | |
* Hypertext Transfer Protocol (HTTP) response status codes. | |
* @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} | |
*/ | |
enum HttpStatusCode { | |
/** | |
* The server has received the request headers and the client should proceed to send the request body |
#! /usr/bin/env ruby | |
# NOTE: Requires Ruby 2.1 or greater. | |
# This script can be used to parse and dump the information from | |
# the 'html/contact_info.htm' file in a Facebook user data ZIP download. | |
# | |
# It prints all cell phone call + SMS message + MMS records, plus a summary of each. | |
# | |
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created |
--- | |
Description: AWS AppSync Notes API | |
Parameters: | |
APIName: | |
Type: String | |
Description: Name of the API - used to generate unique names for resources | |
MinLength: 3 | |
MaxLength: 20 | |
AllowedPattern: '^[a-zA-Z][a-zA-Z0-9_]*$' |
// by @noffle | |
autoinstall () { | |
local MODULES=$(cat $1 | grep "require('.*')" | sed "s/.*require('\(.*\)')/\1/" | grep -v '^\.' | tr '\n' ' ') | |
shift | |
shift | |
npm install $MODULES $@ | |
} |
// This is a proper alternative to | |
// https://github.com/BuckleScript/bucklescript/blob/b9508105b1a35537bdea9a1fabd10f6c65f776b4/jscomp/bsb/templates/react-hooks/src/FetchedDogPictures/FetchedDogPictures.re#L14 | |
// The one in that file uses Promise, but that's *wrong*. | |
// We only used promise as a demo of its API. We'll remove it soon. | |
// As you can see below, the pure XMLHttpRequest code is just as clean, | |
// less mysterious for all, more performant, extensible, and actually correct. | |
// Ignore these externals for now. They're just for illustration | |
// purposes. I just copy pasted the Js code from |
/** | |
* Recipe Tools v0.1 | |
* | |
* This version exists as a GitHub Gist at https://gist.github.com/masyukun/64a3490a464acaa3b9af6819f10dfbf4 | |
* | |
* @license | |
* Copyright (c) 2020 Matthew Royal | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal |