Skip to content

Instantly share code, notes, and snippets.

Tom Preston-Werner mojombo

Block or report user

Report or block mojombo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am mojombo on github.
  • I am mojombo (https://keybase.io/mojombo) on keybase.
  • I have a public key whose fingerprint is 2D99 08C1 7B77 D96C 626E 0957 AA61 B463 79AA F7E5

To claim this, I am signing this object:

View acer-c720-default-ubuntu-hack.md

How to set your Acer C720 Chromebook to boot to Ubuntu by default.

  1. Place your closed laptop on a soft surface, upside down.
  2. Use a sharp knife to cut a hole in the warranty sticker (YES THIS WILL VOID THE WARRANTY).
  3. Remove the 13 screws with a small phillips head screwdriver (PH1 size works well). Be careful, the screws are very small and will strip easily if you use the wrong size screwdriver.
  4. Remove the bottom of the laptop by pulling up on it near the hinges. It takes a bit of pressure to remove, but if you lift it from the back (near the hinges) the same way you would open a laptop screen, the hooks won't break (even though they will make a loud snapping sound).
  5. Remove the BIOS write-protect screw. It is labeled as #7 in this image
  6. With the bottom off, turn over the laptop and open the screen.
  7. Plug the laptop in (it must b
@mojombo
mojombo / vwilight.vim
Created Jan 26, 2011
vwilight.vim: A TRUE Twilight color theme for Vim
View vwilight.vim
" Vim color file
" Converted from Textmate theme Twilight using Coloration v0.2.5 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
View omg.rb
require 'nokogiri'
doc = Nokogiri.HTML DATA
doc.xpath('//div//text()').map { |x| x.content = x.to_s }
p doc.serialize(:save_with => Nokogiri::XML::Node::SaveOptions::NO_DECLARATION)
__END__
<div>&nbsp;<span>x</span></div>
@mojombo
mojombo / comments.xml
Created Jan 2, 2011
XML Comments Suck
View comments.xml
<container>
<thing />
<!--
I think this is the least horrible way to format XML comment
blocks. Even though it wastes two lines, at least it doesn't
involve tons of indenting or horribly misaligned edges.
-->
<fooblah size="10" count="alot" />
</container>
@mojombo
mojombo / config_options.rb
Created Dec 14, 2010
config options mini parser thing
View config_options.rb
# Convert an array of nested key parts into a nested Hash and convert the
# value to a proper Ruby object.
#
# keyparts - An Array of String parts of the nested Hash. For instance, the
# list ['a', 'b', 'c'] would lead to a nested hash that looks like
# {'a' => {'b' => {'c' => X}}}.
# val - The String value that will be converted into the proper Boolean,
# Integer, or String.
#
# Returns the nested Hash.
View gist:482383
[21:24][tom@lepton:~(master)]$ perl --version
This is perl, v5.10.0 built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
[21:23][tom@lepton:~(master)]$ cat test.pod
=head1 Title
=over 4
View demo.pod

Title

1. Item 1
2. Item 2
View auto_link_patch.rb
View sf-veggie-faves.txt
Sandwiches:
* Jay's Cheesesteaks (many seitan flavors)
* Ike's Place (tons of amazing veggie sandwiches)
* Toaster Oven (Potbelly's clone)
Mexican:
* Papalote (their house salsa is the best IN THE WORLD)
* El Buen Sabor (my favorite super veggie burrito)
* Taqueria Cancún (classic mission burrito; open till 2am on fri/sat, 1am other days, I think)
You can’t perform that action at this time.