As configured in my dotfiles.
start new:
tmux
start new with session name:
| 'use strict'; | |
| const pointsToFile = uri => /\/[^/]+\.[^/]+$/.test(uri); | |
| exports.handler = (event, context, callback) => { | |
| // Extract the request from the CloudFront event that is sent to Lambda@Edge | |
| var request = event.Records[0].cf.request; | |
| // Extract the URI from the request |
| 'use strict'; | |
| const path = require('path') | |
| const redirect = new_url => { | |
| return { | |
| status: '301', | |
| statusDescription: 'Moved Permanently', | |
| headers: { | |
| location: [{ |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| function slugify(text) | |
| { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - | |
| .replace(/^-+/, '') // Trim - from start of text | |
| .replace(/-+$/, ''); // Trim - from end of text | |
| } |