Its likely more natural for you to type at the bottom of the file so with normal Go we move the cursor to the bottom before reading from the date command.
# bash_profile.sh
alias did="vim +'normal Go' +'r!date' ~/did.txt"
(function { | |
window.addEventListener('online', doSomething); | |
window.addEventListener('offline', doSomething); | |
})() | |
// @returns: String { "online", "offline" } | |
function doSomething() { | |
returns navigator.onLine; | |
} |
Its likely more natural for you to type at the bottom of the file so with normal Go we move the cursor to the bottom before reading from the date command.
# bash_profile.sh
alias did="vim +'normal Go' +'r!date' ~/did.txt"
const express = require('express') | |
const app = express() | |
const PORT = process.env.PORT || 3000 | |
app.get('/', (req, res) => res.send('Hello World!')) | |
app.listen(PORT, () => console.log(`Example app listening on port ${PORT}!`)) |
# find | |
find -name '* SOME_SPECIFIER.SOME_EXTENSION' | |
# find and delete | |
find -name '* SOME_SPECIFIER.SOME_EXTENSION' -delete | |
# example 1: delete all files to end in `"space"1.JPG` | |
find -name '* 1.JPG' -delete |
const chalk = require('chalk') | |
const inquirer = require('inquirer') | |
const promptSignup = () => { | |
const questions = [ | |
{ | |
message: 'Whats hannenin\'??', | |
name: 'action', | |
type: 'list', | |
choices: ['did', 'task'] |
const fs = require('fs') | |
const path = require('path') | |
const saveToFile = (entry) => { | |
const target = path.join(__dirname, 'did.txt') | |
console.log(chalk.green(`... saving to did.txt`)) | |
if (fs.existsSync(target)) { |
$ brew services start postgresql
app.use(logger("dev")); | |
app.use(express.json()); | |
app.use(express.urlencoded({ extended: false })); | |
app.use(cookieParser()); | |
app.use(express.static(path.join(__dirname, "public"))); | |
app.use(session({ secret: "ilovetodidlist" })); | |
// authman init needs to be invoked AFTER app.use(session) | |
authman.init(app); |