Steps to deploy Node.js to VPS using PM2 and Github Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
NOTE: This code assumes a bare git repo in ./bare-git/, | |
which should have at least one text file in its root, | |
named "greetings.txt". | |
This code updates the contents of a "greetings.txt" | |
file, and creates a new file called "greetings-XXX.txt" | |
(with XXX being a random number). It then creates a new | |
commit for these changes. Finally, it reads and dumps | |
the new current contents of the repo, file by file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
* It was requested to be introduced at as part of the jsonwebtoken library, | |
* since we feel it does not add too much value but it will add code to mantain | |
* we won't include it. | |
* | |
* I create this gist just to help those who want to auto-refresh JWTs. | |
*/ | |
const jwt = require('jsonwebtoken'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare var __DEV__: boolean; | |
declare module 'react-native' { | |
declare type Color = string | number; | |
declare type Transform = | |
{ perspective: number } | | |
{ scale: number } | | |
{ scaleX: number } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"value": -12, | |
"text": "(GMT -12:00) Eniwetok, Kwajalein" | |
}, | |
{ | |
"value": -11, | |
"text": "(GMT -11:00) Midway Island, Samoa" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import WebKit | |
class NativeWebViewController: UIViewController { | |
let viewportScriptString = "var meta = document.createElement('meta'); meta.setAttribute('name', 'viewport'); meta.setAttribute('content', 'width=device-width'); meta.setAttribute('initial-scale', '1.0'); meta.setAttribute('maximum-scale', '1.0'); meta.setAttribute('minimum-scale', '1.0'); meta.setAttribute('user-scalable', 'no'); document.getElementsByTagName('head')[0].appendChild(meta);" | |
let disableSelectionScriptString = "document.documentElement.style.webkitUserSelect='none';" | |
let disableCalloutScriptString = "document.documentElement.style.webkitTouchCallout='none';" | |
override func viewDidLoad() { | |
// 1 - Make user scripts for injection |
- Create or find a gist that you own.
- Clone your gist (replace
<hash>
with your gist's hash):# with ssh git clone [email protected]:<hash>.git mygist # with https
git clone https://gist.github.com/.git mygist
Last Updated: March 2023
IMPORTANT: Ignore the out-of-date steps below for getting Chromium keys.
Instead, read this up-to-date guide (Jan 2023) written by @LearningToPi.
P.S. Thank you to every contributor below who provided tips over the years on what should be a straightforward process: setting up Chromium for local development.
Long live the web!
NewerOlder