Skip to content

Instantly share code, notes, and snippets.

View jrk's full-sized avatar

Jonathan Ragan-Kelley jrk

View GitHub Profile
@jrk
jrk / 55-bytes-of-css.md
Created September 26, 2022 06:27 — 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;
}
# Based on @berenm's pull request https://github.com/quarnster/SublimeClang/pull/135
# Create the database with cmake with for example: cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
# or you could have set(CMAKE_EXPORT_COMPILE_COMMANDS ON) in your CMakeLists.txt
# Usage within SublimeClang:
# "sublimeclang_options_script": "python ${home}/code/cmake_options_script.py ${project_path:build}/compile_commands.json",
import re
import os
import os.path
@jrk
jrk / redis-server-for-init.d-startup
Created January 25, 2010 17:00 — forked from mtodd/redis-server-for-init.d-startup
init.d script for redis server
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@jrk
jrk / flac2mp3
Created November 10, 2009 01:21 — forked from mxcl/flac2mp3.md
Simple flac2mp3 conversion script, supporting essential tags and batch processing with globs.
#!/usr/bin/ruby
# http://gist.github.com/230533
# forked from http://gist.github.com/124242
# TODO: add iteration over arguments
filename=ARGV[0]
abort "Usage: flac2mp3 FLACFILE" if filename.nil?
`metaflac --export-tags-to=- "#{filename}"`.each_line do |s|
v=s.strip.split '=', 2
@jrk
jrk / httpd.conf
Created September 25, 2009 20:27 — forked from al3x/gist:187147
Alex Payne web productivity hack: redirect distracting domains to a local page which pops up Things.
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@jrk
jrk / newpost.rb
Created May 5, 2009 06:48 — forked from al3x/newpost.rb
Creates a new Jekyll post, opens it in TextMate, and adds to the git index
#!/usr/bin/env ruby
require Dir
unless ARGV[0]
puts 'Usage: newpost "the post title"'
exit(-1)
end
blog_root = "/Users/jrk/proj/blog"