Simple nodejs script to convert timeline from twitter (https://dev.twitter.com) to twtxt (https://github.com/buckket/twtxt) format.
$ npm install twitter moment
$ convert.js > ~/twtxt.txt
/** | |
* Using Operator Mono in Atom | |
* | |
* 1. Open up Atom Preferences. | |
* 2. Click the “Open Config Folder” button. | |
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
* 5. Tweak away. | |
* | |
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
Simple nodejs script to convert timeline from twitter (https://dev.twitter.com) to twtxt (https://github.com/buckket/twtxt) format.
$ npm install twitter moment
$ convert.js > ~/twtxt.txt
#!/usr/bin/env php | |
<?php | |
// Script to postpone your own email. Parses IMAP folders and moves emails to a folder named "Today" | |
// Run this from a crontab, for example at 6 AM | |
// BSD License | |
// (C) Carlos Fenollosa, 2011-2016 | |
// Read more about this script: http://cfenollosa.com/blog/a-simple-script-to-postpone-your-own-email.html | |
// Please leave comments and feedback for bugs and ideas! |
var webpack = require('webpack'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var path = require('path'); | |
var folders = { | |
APP: path.resolve(__dirname, '../app'), | |
BUILD: path.resolve(__dirname, '../build'), | |
BOWER: path.resolve(__dirname, '../bower_components'), | |
NPM: path.resolve(__dirname, '../node_modules') | |
}; |
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
function pdf_join { | |
join_py="/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" | |
read -p "Name of output file > " output_file && "$join_py" -o $output_file $@ && open $output_file | |
} |