Skip to content

Instantly share code, notes, and snippets.

View ericandrewlewis's full-sized avatar

Eric Lewis ericandrewlewis

View GitHub Profile
@ericandrewlewis
ericandrewlewis / gist:95239573dc97c0e86714
Last active December 12, 2023 09:52
Setting up a WordPress site on AWS

Setting up a WordPress site on AWS

This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.

This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.

If you experience any difficulties or have any feedback, leave a comment. 🐬

Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.

@ericandrewlewis
ericandrewlewis / gist:4db82d6d3db17bdf9391
Created May 6, 2015 03:08
Every WP plugin file that references wp.media
./2048-number-game/js/settings.js
./2bc-image-gallery/includes/js/2bc-image-gallery-admin.js
./3d-coming-soon-page/admin-folder/admin/redux-framework/ReduxCore/assets/js/media/media.js
./3d-coming-soon-page/admin-folder/admin/redux-framework/ReduxCore/assets/js/media/media.min.js
./3d-coming-soon-page/admin-folder/admin/redux-framework/ReduxCore/inc/fields/gallery/field_gallery.js
./3d-coming-soon-page/admin-folder/admin/redux-framework/ReduxCore/inc/fields/gallery/field_gallery.min.js
./a3-portfolio/assets/js/a3.portfolio.metabox.admin.js
./a3-portfolio/assets/js/a3.portfolio.metabox.admin.min.js
./about-me-page/js/admin.js
./aboutimizer/js/scripts.js

On Lockpicking

Carrying picking tools is not against the law but context matters (being behind the home depot at 2 am)

Do not pick locks you do not own Do not pick locks which you rely on (bc you can break them)

Pin tumbler locks goes back 4500 yrs

Lockcon

@ericandrewlewis
ericandrewlewis / gist:f8989155392d71d8fa5e
Last active August 29, 2015 14:20
On Skateboarding
@ericandrewlewis
ericandrewlewis / gist:e8ae3a57ceddc8438352
Last active August 29, 2015 14:19
On Silkscreening

On Silkscreening

Making a transparency

Registration marks are printed on the transparency along with any other helpful info (e.g. color notes). Place one above and one below the artwork in absolute center.

You need complete opacity in your printed transparency positive. There's something special in printers with black ink in each cartridge that allows you to get complete opacity.

RIP software translates illustrations for silkscreen prints. For example, a 50% opacity fill with #fff can be converted into half tone dots.

@ericandrewlewis
ericandrewlewis / gist:d4ac45fb78f0f2cd8e38
Last active August 29, 2015 14:19
On Linux Administration

On Linux Administration

User management

/etc/passwd lists all users. One per line, in the format {username}:{password}:{user-id}:{user-info}:{path-to-user's-home-directory}:{path-to-user-shell-program}

Create a new user account

useradd [options] username

@ericandrewlewis
ericandrewlewis / gist:2cd59e6932c78a8d113a
Last active August 29, 2015 14:18
Hacker, Hoaxer, Whistleblower, Spy

Notes on reading Hacker, Hoaxer, Whistleblower, Spy

The lulz - a deviant style of humor and a quasi-mystical state of being" (2)

[In their "war" on Scientology], Anonymous shifted from ultracoordinated motherfuckery to the dissemination of incriminating facts about Scientology. They also forged bonds with an older generation of dissidents already at work highlighting the Church's abuses. (6)

Interesting how the movement evolved here

On programming

Cyclomatic complexity

"I'm not sure I can easily explain what this code is doing" - Gregory Cornelius

Blackboxing

"Smart data structures and dumb code works a lot better than the other way around" - Eric S. Raymond, The Cathedral and the Bazaar