Skip to content

Instantly share code, notes, and snippets.

View tjboudreaux's full-sized avatar
🎯
Focusing

Travis Boudreaux tjboudreaux

🎯
Focusing
View GitHub Profile
@yefim
yefim / Dockerrun.aws.json
Last active April 7, 2023 16:11
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "443"
}
brew list -1 | while read line; do brew unlink $line; brew link $line; done
@justmoon
justmoon / custom-error.js
Last active June 26, 2024 09:36 — forked from subfuzion/error.md
Creating custom Error classes in Node.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
this.extra = extra;
};
require('util').inherits(module.exports, Error);
@lovett
lovett / phing-upgrade-wordpress
Created November 21, 2010 20:57
Phing task for upgrading WordPress
<target name="wordpress.upgrade">
<property name="tmp" value="/tmp" />
<property name="src" value="${tmp}/wordpress" />
<delete dir="${src}" includeemptydirs="true" failonerror="true" />
<exec dir="${tmp}" command="curl -s http://wordpress.org/latest.tar.gz | tar -xz" />
<delete dir="wp-admin" includeemptydirs="true" failonerror="true" />
<delete dir="wp-includes" includeemptydirs="true" failonerror="true" />
<move file="wp-config.php" tofile="wp-config.php.bak" overwrite="true"/>