Skip to content

Instantly share code, notes, and snippets.

@capnslipp
capnslipp / gist:716149
Created November 26, 2010 01:14
HTML Special Characters - Quick-Access Sheet
<dl>
<dt>emsp:</dt><dd><textarea>&emsp;</textarea></dd>
</dl>
@capnslipp
capnslipp / index.html
Last active September 24, 2015 14:58
First Revision of 6bitt.com (2002-11-30)
<HTML>
<HEAD>
<TITLE>YOUR DUMB!!! STOMP STOMP!!</TITLE>
</HEAD>
<BODY bgcolor="#000000">
<TABLE width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
   <TR>
       <TD colspan="2" height="100%" align="center" valign="center">
           <CENTER>
@capnslipp
capnslipp / .gitconfig
Last active January 31, 2023 16:17
my global .gitconfig file(s), with tweaks for: command verbosity, more-distinct colors, and handy aliases
# Base
[core]
excludesfile = /Users/capnslipp/.git_excludes
attributesfile = /Users/capnslipp/.git_attributes
#editor = mate -w
editor = macdown-wait
whitespace = tabwidth=4, space-before-tab, indent-with-non-tab, blank-at-eol, blank-at-eof
# defaults: whitespace = blank-at-eol, space-before-tab, -indent-with-non-tab, -tab-in-indent, blank-at-eof, trailing-space, -cr-at-eol, tabwidth=8
quotepath = false
@capnslipp
capnslipp / gist:1186489
Created September 1, 2011 15:55
RegExp'ing in JSON
var endOfScopeMarker = '\t\t},';
var find = new RegExp('"someProperty" : 3((?:(?!'+endOfScopeMarker+').|\n)+)("anotherPropertyWithinTheSameScope" : 1,)', "g");
var replace: '"someProperty" : 0$1$2';
class Object
def scoped(&block)
self.instance_eval(&block)
end
end
module Kernel
def with_scoped(&block)
return lambda { |obj|
obj.instance_eval(&block)
@capnslipp
capnslipp / ghfmd.rb
Created February 19, 2012 03:03
Markdown Renderer, avec GitHub-Flavor™
#!/usr/bin/env ruby
# ^ 1.8.x or 1.9, folks!
require 'rubygems'
require File.expand_path('./md_izer', File.dirname(__FILE__))
render_options = {
:fenced_code_blocks => true,
:autolink => true,
:space_after_headers => true
# running:
require 'redcarpet'; puts Redcarpet::Markdown.new(Redcarpet::Render::HTML).render('# hi #')
# gives me:
/Users/slippyd/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- redcarpet (LoadError)
from /Users/slippyd/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from -:1:in `<main>'
/Users/slippyd/.rvm/gems/ruby-1.9.3-p0/bin:/Users/slippyd/.rvm/gems/ruby-1.9.3-p0@global/bin:/Users/slippyd/.rvm/rubies/ruby-1.9.3-p0/bin:/Users/slippyd/.rvm/bin:/Users/slippyd/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin
/Applications/TextMate.app/Contents/SharedSupport/Support/bin/CocoaDialog.app/Contents/MacOS:/Users/slippyd/bin:$PATH:/Applications/TextMate.app/Contents/SharedSupport/Support/bin
$ rvm list
rvm rubies
ruby-1.8.6-p420 [ i686 ]
ruby-1.8.7-p357 [ i686 ]
ruby-1.9.1-p431 [ i386 ]
ruby-1.9.2-p290 [ x86_64 ]
=* ruby-1.9.3-p0 [ x86_64 ]