Skip to content

Instantly share code, notes, and snippets.

class ActionView::Helpers::InstanceTag
DEFAULT_FIELD_OPTIONS.delete("size")
DEFAULT_TEXT_AREA_OPTIONS.delete("rows")
DEFAULT_TEXT_AREA_OPTIONS.delete("cols")
end
$:<< File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
require 'cinch'
class TurnBot
include Cinch::Plugin
def initialize(*args)
super
@turns = []
module HTML
class StathamSanitizer < WhiteListSanitizer
protected
def tokenize(text, options)
super.map do |token|
if token.is_a?(HTML::Tag) && options[:parent].include?(token.name)
token.to_s.gsub(/</, "&lt;")
else
#!/usr/bin/env ruby
#
# stevie_chambers@viewyonder.com July 2012
#
# I'm playing around with APIs, and sharing my learnings
# You can follow my trials and tribulations at http://viewyonder.com/apis
#
# This is a simple Ruby script to show how a simple API might work.
# The resource model is just a simple array of a single class - no back-end store (yet)
#
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never">
<!-- This style was edited with the Visual CSL Editor (http://steveridout.com/csl/visualEditor/) -->
<info>
<title>American Psychological Association 6th Edition - Spanish Translation</title>
<id>https://gist.github.com/4225434</id>
<link href="http://www.zotero.org/styles/apa" rel="self"/>
<link href="http://owl.english.purdue.edu/owl/resource/560/01/" rel="documentation"/>
<author>
<name>Simon Kornblith</name>
  • This creates a 560mb ramdisk. Adjust the size accordingly. I think the number at the end of the command is the number of disk blocks. They are 2kb in size for me.
  • Restarting postgres is not necessary; you can create the ramdisk and tablespace while postgres is running.
  • You will lose all data in the ramdisk tablespace when you shut your machine down

  $ diskutil erasevolume HFS+ "postgres_ramdisk" `hdiutil attach -nomount ram://1165430`
  Started erase on disk1
  Unmounting disk
  Erasing
 Initialized /dev/rdisk1 as a 569 MB HFS Plus volume
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cartografía</title>
<script type="text/javascript" src="LibreVPN_files/d3.js"></script>
<script type="text/javascript" src="LibreVPN_files/index.js"></script>
<link type="text/css" rel="stylesheet" href="LibreVPN_files/force.css">
<link type="text/css" rel="stylesheet" href="LibreVPN_files/example-styles.css">
@mauriciopasquier
mauriciopasquier / deploy.rb
Created June 3, 2016 08:37 — forked from djo/deploy.rb
Rails, Nginx, XSendfile, and X-Accel-Mapping
# Symlink the shared protected folder
run "ln -nfs #{shared_path}/protected #{latest_release}/protected"

Turning Off Github Issues

My friend Michael Jackson turned off github issues on one of his smaller projects. It got me thinking...

Maintainers getting burned out is a problem. Not just for the users of a project but the mental health of the maintainer. It's a big deal for both parties. Consumers want great tools, maintainers want to create them, but maintainers don't want to be L1 tech support, that's why they