Generate a key if needed:
ssh-keygen -t rsa
It should now be located in: ~/.ssh/
as id_rsa
and id_rsa.pub
.
data:text/html, <html contenteditable style="background-color: hsl(232deg, 16%, 8%); color: hsl(232deg, 16%, 80%); font-family: ui-monospace, Menlo,Monaco, 'Cascadia Mono','Segoe UI Mono', 'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro','Fira Mono', 'Droid Sans Mono', 'Courier New', monospace; font-size: 16px; max-width: 80ch; margin: 2rem auto;"> |
sudo rm -rf $(xcode-select -print-path) | |
xcode-select --install |
git config --unset-all core.ignorecase && git config --system core.ignorecase false |
// Taken from https://stackoverflow.com/questions/33063213/pdf-js-with-text-selection | |
PDFJS.getDocument('file.pdf').then(function(pdf){ | |
var page_num = 1; | |
pdf.getPage(page_num).then(function(page){ | |
var scale = 1.5; | |
var viewport = page.getViewport(scale); | |
var canvas = $('#the-canvas')[0]; | |
var context = canvas.getContext('2d'); | |
canvas.height = viewport.height; | |
canvas.width = viewport.width; |
// Taken from https://stackoverflow.com/questions/22367711/construct-hierarchy-tree-from-flat-list-with-parent-field | |
function treeify(list, idAttr, parentAttr, childrenAttr) { | |
if (!idAttr) idAttr = 'id'; | |
if (!parentAttr) parentAttr = 'parent'; | |
if (!childrenAttr) childrenAttr = 'children'; | |
var treeList = []; | |
var lookup = {}; | |
list.forEach(function(obj) { | |
lookup[obj[idAttr]] = obj; |
// Taken from https://bost.ocks.org/mike/shuffle/ | |
function shuffle(array) { | |
var m = array.length, t, i; | |
// While there remain elements to shuffle… | |
while (m) { | |
// Pick a remaining element… | |
i = Math.floor(Math.random() * m--); |
Add your Node user. If Apache or something else this could be www-data
.
sudo adduser nodejs
Add users to that group to allow access to the www
directory.
sudo usermod -aG nodejs <username>
git branch -m new-name
If you are on a different branch:
[Unit] | |
Description=NodeJS Startup | |
After=network.target | |
[Service] | |
ExecStart=/usr/bin/nodejs /var/www/repo/build/server | |
Environment=NODE_ENV=production | |
User=nodejs | |
Restart=on-failure |