This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title> | |
Making dash doctests using sphinx and doc2dash | EF | |
</title> | |
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> | |
<link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'> | |
<link rel="stylesheet" href="http://nafiulis.me/theme/css/main.css"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Kitabu | |
module Markdown | |
class Renderer < Redcarpet::Render::HTML | |
include Redcarpet::Render::SmartyPants | |
include Rouge::Plugins::Redcarpet | |
end | |
class << self | |
# Set markdown renderer | |
attr_accessor :processor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rack' | |
require 'rack-legacy' | |
require 'rack-rewrite' | |
INDEXES = [ 'index.html' , 'index.php' , 'index.cgi' ] | |
ENV [ 'SERVER_PROTOCOL' ] = "HTTP/1.1" | |
use Rack : :Rewrite do | |
rewrite %r{(.*/$)} , lambda { | match , rack_env | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "iTunes" | |
set setupNeeded to false | |
--fetch prior selected playlist name and playback rate | |
try | |
set targetPlaylistName to do shell script "defaults read com.jeffporten.fastpodcast SelectedPlaylist" | |
set playbackRate to do shell script "defaults read com.jeffporten.fastpodcast PlaybackRate" | |
on error -- probably first run of script | |
set setupNeeded to true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cheatsheet do | |
title 'Sample' # Will be displayed by Dash in the docset list | |
docset_file_name 'Sample' # Used for the filename of the docset | |
keyword 'sample' # Used as the initial search keyword (listed in Preferences > Docsets) | |
# resources 'resources_dir' # An optional resources folder which can contain images or anything else | |
introduction 'My *awesome* cheat sheet' # Optional, can contain Markdown or HTML | |
# A cheat sheet must consist of categories | |
category do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python | |
import os, re, sqlite3 | |
from bs4 import BeautifulSoup, NavigableString, Tag | |
db = sqlite3.connect('postgresql.docset/Contents/Resources/docSet.dsidx') | |
cur = db.cursor() | |
try: cur.execute('DROP TABLE searchIndex;') | |
except: pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadModule passenger_module /usr/local/opt/passenger/libexec/buildout/apache2/mod_passenger.so | |
PassengerRoot /usr/local/opt/passenger/libexec/lib/phusion_passenger/locations.ini | |
PassengerDefaultRuby /usr/bin/ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias mysql=/usr/local/mysql/bin/mysql | |
alias mysqladmin=/usr/local/mysql/bin/mysqladmin | |
sudo mkdir /var/mysql | |
sudo ln -d /tmp/mysql.sock /var/mysql/mysql.sock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadModule php5_module libexec/apache2/libphp5.so | |
DocumentRoot "/Users/quick/www" | |
<Directory "/Users/quick/www"> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RailsEnv development | |
<Location /rubyapp> | |
PassengerAppRoot /Users/quick/www/rubyapp | |
RackBaseURI /rubyapp | |
Options -MultiViews | |
</Location> |