This is a collection of basic "recipes", many using twurl (the Swiss Army Knife for the Twitter API!) and jq to query the Twitter API and format the results. Also, some scripts to test or automate common actions.
module.exports = { | |
plugins: [ | |
// es2015 - based off of v6.3.13 | |
// https://github.com/babel/babel/blob/master/packages/babel-preset-es2015/index.js | |
[require('babel-plugin-transform-es2015-template-literals'), { loose: true }], | |
require('babel-plugin-transform-es2015-literals'), | |
require('babel-plugin-transform-es2015-function-name'), | |
require('babel-plugin-transform-es2015-arrow-functions'), | |
require('babel-plugin-transform-es2015-block-scoped-functions'), | |
[require('babel-plugin-transform-es2015-classes'), { loose: true }], |
aws s3 sync s3://oldbucket s3://newbucket --source-region us-west-1 --region us-west-2 |
This guide will demonstrate the steps required to encrypt and decrypt files using OpenSSL on Mac OS X. The working assumption is that by demonstrating how to encrypt a file with your own public key, you'll also be able to encrypt a file you plan to send to somebody else using their private key, though you may wish to use this approach to keep archived data safe from prying eyes.
Assuming you've already done the setup described later in this document, that id_rsa.pub.pcks8 is the public key you want to use, that id_rsa is the private key the recipient will use, and secret.txt is the data you want to transmit…
$ openssl rand 192 -out key
$ openssl aes-256-cbc -in secret.txt -out secret.txt.enc -pass file:key
These scripts are to compliment the DocPad Continuous Deployment Guide.
#!/bin/bash | |
#set -x | |
#DEBUG=echo | |
# Runs via cron to shut down the instance if it's not in use for 5 minutes | |
# Starts checks after it's been up more than 500secs | |
# Won't kick you out if you're ssh'ed in and it's idle. | |
# crontab -l|grep idle | |
# */6 * * * * /root/bin/idle.sh >/dev/null 2>&1 | |
until $(awk '$1>500{exit 1}' /proc/uptime) |
#!/bin/sh | |
# Install the AWS CLI, set up an IAM user for the instance(s) you want to control. | |
# Pull the AWS keys for the IAM user and run aws configure to add them. | |
# I run this on Sophos UTM and have Sophos run a reverse proxy from the \ | |
# $ROUTERIP:32400 to $PLEXHOST:32400 | |
# set -x | |
# started with screen -Sdm a '/root/bin/awscheck.sh'een -Sdm a '/root/bin/awscheck.sh'screen -Sdm a '/root/bin/awscheck.sh'screen -Sdm a '/root/bin/awscheck.sh'n -Sdm a '/root/bin/awscheck.sh' | |
PLEXHOST=dokie.duckdns.org | |
WANIF=eth2 |
Some thoughts on a new CMS, in different progressions.
function foo(x) { x = (typeof x != "undefined") ? x : 10; .. } | |
function foo(x = 10) { .. } | |
function foo(x,y,z) { .. }; foo.apply(null,[1,2,3]); | |
function foo(x,y,z) { .. }; foo(...[1,2,3]); | |
function foo() { var args = [].slice.call(arguments); .. } | |
function foo(...args) { .. } | |
var o = { x: 2, y: 3 }, x = o.x, y = o.y, z = (typeof o.z != "undefined") ? o.z : 10; |
This gist is used to contain list of issues I've encountered with entities. Luckily, all have been resolved.