Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

John McLear JohnMcLear

🏠
Working from home
View GitHub Profile
View gist:43324e20d3382854066a710c8146c80e
'use strict';
/**
* This code is mostly from the old Etherpad. Please help us to comment this code.
* This helps other people to understand this code better and helps them to improve it.
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
*/
/**
* Copyright 2009 Google Inc.
*
View ace.js
'use strict';
/**
* This code is mostly from the old Etherpad. Please help us to comment this code.
* This helps other people to understand this code better and helps them to improve it.
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
*/
/**
* Copyright 2009 Google Inc.
*
View gist:f34ab70d4ff79a3010e24348f1ade409
C:\new-etherpad-lite-win>node src\node\server.js
[2021-02-17 21:30:31.017] [DEBUG] console - Running on Node v12.20.2 (minimum required Node version: 10.17.0)
[2021-02-17 21:30:31.044] [INFO] console - All relative paths will be interpreted relative to the identified Etherpad base dir: C:\new-etherpad-lite-win
[2021-02-17 21:30:31.045] [INFO] console - Random string used for versioning assets: ecf0e541
[2021-02-17 21:30:31.046] [DEBUG] AbsolutePaths - Relative path "settings.json" can be rewritten to "C:\new-etherpad-lite-win\settings.json"
[2021-02-17 21:30:31.046] [DEBUG] AbsolutePaths - Relative path "credentials.json" can be rewritten to "C:\new-etherpad-lite-win\credentials.json"
[2021-02-17 21:30:31.055] [INFO] console - settings loaded from: C:\new-etherpad-lite-win\settings.json
[2021-02-17 21:30:31.059] [INFO] console - No credentials file found in C:\new-etherpad-lite-win\credentials.json. Ignoring.
[2021-02-17 21:30:31.061] [INFO] console - Using skin "colibris" in dir: C:\new-etherpad-lite-win\src
View gist:b6d6430cd20a0fee4e6261734d67c51e
'use strict';
const HAProxy = require('haproxy');
const haproxy = new HAProxy('/tmp/haproxy.sock');
const ha = (method) => {
return new Promise((resolve, reject) => {
haproxy[method]((err, data) => {
if (err) {
return reject(err);
@JohnMcLear
JohnMcLear / lint.md
Created Nov 22, 2020
Lint instructions
View lint.md

I'm looking for someone to help fix the linting issues on Etherpad plugins that the npm run lint:fix can't fix automatically.

Why you should do this?

This will be good experience for a junior web dev, it will teach the following skills:

  • git & Github (fork, branch, commit, push, pull requests)
  • linting
  • Javascript code editing
  • Nodejs app execution
  • Etherpad file structure
View gist:61a5fb070195059569b8bde19a2fa4c3
HTTP/1.1 200 OK
Server: nginx/1.10.3
Date: Sun, 15 Nov 2020 16:05:32 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 42015
Connection: keep-alive
X-Powered-By: Express
X-UA-Compatible: IE=Edge,chrome=1
Referrer-Policy: same-origin
ETag: W/"a41f-CEbzxqIqlIZdJwLcwq38rO7l/Xs"
View gist:3ce9a9e80f64753c37b591e9abbe7706
root@loadtest:/home/pi/etherpad-lite# curl -I http://loadtest/p/one
HTTP/1.1 200 OK
Server: nginx/1.10.3
Date: Sun, 15 Nov 2020 16:03:28 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 42015
Connection: keep-alive
X-Powered-By: Express
X-UA-Compatible: IE=Edge,chrome=1
View gist:12c9fb31e8fbd4fd2c6b7e50ec6bb1d9
server {
listen 80;
server_name _;
add_header X-ref $http_referer; #is populated for css but not js
add_header X-hello "world"; #works
location / {
proxy_pass http://127.0.0.1:9001;
}
}
View dirty_git_db.js
/**
* 2011 Peter 'Pita' Martischka
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
View dirty_db_git.js
/**
* 2011 Peter 'Pita' Martischka
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software