Skip to content

Instantly share code, notes, and snippets.

Avatar

Oliver Davies opdavies

View GitHub Profile
@stidges
stidges / tailwind.itermcolors
Last active Oct 9, 2021
An iTerm2 color scheme based on the Tailwind CSS color scheme (https://tailwindcss.com/docs/colors)
View tailwind.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.17254902422428131</real>
@xrstf
xrstf / letsencrypt.md
Last active Aug 3, 2021
Let's Encrypt on Ubuntu 14.04, nginx with webroot auth
View letsencrypt.md

Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.

As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).

Configuration

For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:

@Mulkave
Mulkave / drupal-nginx-virtualhost.conf
Created Jul 29, 2013
drupal virtual host configuration for Nginx
View drupal-nginx-virtualhost.conf
server {
server_name [host];
root /var/www/[document_root]; ## <-- Your only path reference.
# Enable compression, this will help if you have for instance advagg module
# by serving Gzip versions of the files.
gzip_static on;
location = /favicon.ico {
@mnapoli
mnapoli / behat-reference.feature
Last active Jun 17, 2021
Behat Mink reference
View behat-reference.feature
# Given
Given I am on [the] homepage
Given I am on "url"
# When
When I go to [the] homepage
When I go to "url"
When I reload the page
@malarkey
malarkey / Contract Killer 3.md
Last active Oct 23, 2021
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@thulstrup
thulstrup / compass-retina-sprites.scss
Created Mar 20, 2012
Using Compass to generate normal and retina sprite maps
View compass-retina-sprites.scss
$sprites: sprite-map("sprites/*.png");
$sprites-retina: sprite-map("sprites-retina/*.png");
@mixin sprite-background($name) {
background-image: sprite-url($sprites);
background-position: sprite-position($sprites, $name);
background-repeat: no-repeat;
display: block;
height: image-height(sprite-file($sprites, $name));
width: image-width(sprite-file($sprites, $name));
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@MattHall
MattHall / Rakefile
Created Feb 11, 2012
Rake task for creating new posts in Jekyll
View Rakefile
require 'rubygems'
require 'optparse'
require 'yaml'
task :np do
OptionParser.new.parse!
ARGV.shift
title = ARGV.join(' ')
path = "_posts/#{Date.today}-#{title.downcase.gsub(/[^[:alnum:]]+/, '-')}.markdown"