Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@clatwell
clatwell / phvn-features.md
Created June 20, 2017 20:45
[PHVN] Features and Maintenance

Features

This is the primary list of things we hear about and also think would make sense for Posthaven.

  • Import from other blogs sites – primarily Wordpress a few requests for Tumblr and Medium
  • API – Primarily requested for blog post CRUD
  • Markdown support both in the online editor and when posting via email
  • Other types of payment than via credit card
#!/usr/bin/env ruby
url = ARGV.pop
if url.to_s.strip.length == 0
puts "Error: Please supply a URL"
exit 1
end
uncompressed_bytes = `curl "#{url}" --silent --write-out "%{size_download}\n" --output /dev/null`
@kneath
kneath / Guide.md
Created June 8, 2014 01:16
FoldingText 2.0's User Guide

Welcome to the User's Guide

Remember, it's all just text.

FoldingText does some neat things, but in the end you are just typing. If you know how to type, you already know most of what you need to effectively use FoldingText.

(Click "#" to expand headings)


@gotascii
gotascii / campfire.rb
Created March 22, 2011 15:00
cap recipe to notify campfire on deploy
require 'uri'
require 'tinder'
class Campfire
attr_reader :config
def initialize(config)
@config = config
end
@gotascii
gotascii / simple_deployer.rb
Created March 22, 2011 14:46
cc.rb auto-deployer
# This plugin will deploy your app using capistrano.
# If the build fails the app won't de be deployed and if it passes it will try to deploy to a list of stages you can supply.
#
# Configuration
# In your project's cruise_config.rb file:
#
# Pass an array of stages you want to deploy to
# project.cap_deployer.stages = ['integration', 'staging']
#
# source ~/.rvm/scripts/rvm before deployment?
#!/usr/bin/env bash
gem uninstall rubygems-update
gem install rubygems-update --version $1
update_rubygems
@mig
mig / minispec.rb
Created October 31, 2010 21:28
I want to use minitest in a Rails project with spec like syntax (work in progress)
class Object
cattr_accessor :current_test
end
module Minispec
class TestClass
def self.prepare(desc)
name = name_for_class(desc)
Class.new(base_test_class(name)) do
define_singleton_method(:name) { name }