Skip to content

Instantly share code, notes, and snippets.

@a-warner
a-warner / 55-bytes-of-css.md
Created September 25, 2022 20:55 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
require 'nokogiri'
require 'octokit'
require 'open-uri'
github = Octokit::Client.new(:access_token => ENV['GH_TOKEN'])
doc = Nokogiri::HTML.fragment(open('https://github.com/imathis/octopress/wiki/3rd-Party-Octopress-Themes').read)
doc.search('table tr td:first a:first').map do |a|
a['href'] =~ %r{https?://github.com/([^/]+)/([^?/]+)(\?|$|/)} && [$1, $2]
@a-warner
a-warner / site.pp
Created February 15, 2014 00:31 — forked from niw/site.pp
node default {
# This is required to apply some manifests since these are not using
# appropriate user, group or full path to the command.
Exec {
group => "staff",
user => $boxen_user,
path => [
"/usr/local/bin",
"/usr/bin",
"/bin",
#
# Ideas stolen from lograge and brought to Rails 2.3
# https://github.com/mattmatt/lograge/blob/master/lib/lograge/log_subscriber.rb
#
module ImprovedControllerLogging
def self.included(base)
base.alias_method_chain :log_processing, :fixup
base.inject_alias_method_chain :perform_action,
:perform_action_with_benchmark,
#!/usr/bin/env sh
# Title: Ruby development environment for OS X (Lion)
# Author: Rogelio J. Samour
# Warning:
# While it is unlikely any code below might damage your system,
# it’s always a good idea to back up everything that matters to you
# before running this script! Just in case. I am not responsible for
# anything that may result from running this script. Proceed at
# your own risk.
@a-warner
a-warner / ant.sh
Created February 24, 2012 01:05
Is it your month to drink for free at Ant?
#!/bin/sh
if [ ! $# -gt 0 ]; then echo "Usage: $0 <Name>"; exit 1; fi
curl "http://antarcticabar.com/NameNight.html" 2> /dev/null | grep -oi "$1" | wc -l | awk '{ if ($1 > 0) { print "Your month" } else {print "Nope"} }'