Skip to content

Instantly share code, notes, and snippets.

DevOps for's CMS

Elijah Lynn ElijahLynn

DevOps for's CMS
View GitHub Profile
ElijahLynn / simplehttp.service
Last active May 7, 2019 — forked from funzoneq/simplehttp.service
A systemd file for a Python SimpleHTTPServer
View simplehttp.service
# Upstream
Description=Job that runs the Python SimpleHTTPServer daemon
ExecStartPre=-/usr/bin/mkdir /tmp/backups
ExecStart=/usr/bin/python -m SimpleHTTPServer 80 &
View countCSSRules.js
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
for (var i = 0; i < document.styleSheets.length; i++) {
function countSheet(sheet) {

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

ElijahLynn / replify
Created Aug 19, 2016 — forked from danielrw7/ replify
replify - Create a REPL for any command
View replify
printf "Initialized REPL for [%s]\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
eval "$command $input"
printf "\n%s> " "$command"
ElijahLynn /
Created Feb 2, 2016 — forked from mislav/
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o

ElijahLynn /
Created Jan 21, 2016 — forked from aderowbotham/
Purge (ban) an entire domain in Varnish Cache 3

How to purge ('ban') an entire domain in Varnish Cache 3

#####EDIT: NB Ban is technically different from Purge. Banned objects remain in memory but banning is faster than purging. Read the Varnish 3 documentation here and here.

Purge may be a more appropriate action for your use-case; although the examples in the gist below work, it's not necessarily the best way of doing this.

if [[ $1 ]];
php -r " echo var_dump(unserialize('"$1"')); echo \"\\n\";"
php -r " echo var_dump(unserialize('"$STRING"')); echo \"\\n\";"
View SassMeister-input-HTML.html
<div class="crosshair"></div>
ElijahLynn / Gemfile
Created Sep 6, 2012 — forked from dvessel/README.mdown
Sass+Compass, Guard, LiveReload
View Gemfile
# ~/Gemfile
source ""
group :development do
gem 'compass' # Depends on Sass, will be installed automatically.
gem 'compass-960-plugin' #
gem 'compass-validator' # So you can `compass validate`.
gem 'oily_png' # Faster Compass sprite generation.
gem 'css_parser' # Helps `compass stats` output statistics.