Skip to content

Instantly share code, notes, and snippets.

main( ) {
extrn a, b, c;
putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'hell';
b 'o, w';
c 'orld';
@gjtorikian
gjtorikian / remove_file.rb
Last active March 20, 2023 03:21
How to remove a file from a subdirectory using the GitHub API v3
#!/usr/bin/env ruby
require 'octokit'
# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
login = ENV['GH_LOGIN']
password = ENV['GH_LOGIN_PASSWORD']
repo = "gjtorikian/crud-test"
master = client.ref(repo, "heads/master")
@gjtorikian
gjtorikian / font-builder
Created March 21, 2013 00:23
Font-builder OS X commands
brew install fontforge
ln -s /opt/X11/lib/libfreetype.6.dylib /usr/local/lib/libfreetype.6.dylib
brew tap sampsyo/py
brew install PyYAML
pip -q install pystache argparse
@gjtorikian
gjtorikian / create_file.rb
Created April 16, 2013 19:35
How to create a file using the GitHub v3 API
require 'octokit'
# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
login = ENV['GH_LOGIN']
password = ENV['GH_LOGIN_PASSWORD']
repo = "gjtorikian/crud-test"
client = Octokit::Client.new(:login => login, :password => password)
# grab the current master branch
@gjtorikian
gjtorikian / org-mode.rb
Created September 19, 2013 21:03
Org mode test
require 'org-ruby'
x = <<-EOS
* TODO WHAT
* Functionality
** TODO Integer correctness
*** Use smallest integer sizes always
*** Overflow-check all integer multiplication
*** Overflow-check all integer addition
  • Eveline
  • A Little Cloud
  • Childhood
    • An Encounter
    • Good Story
      • The Sisters
      • Better Story!
  • Araby
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-fareast-font-family:Cambria;mso-fareast-theme-font:minor-latin;
mso-bidi-font-family:Cambria;mso-bidi-theme-font:minor-latin'><span
style='mso-list:Ignore'>19.<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>And
think of all the minor towns <span class=GramE>who</span> sacrificed everything
to build an altar for the locomotive. Mayors that believed their townÕs future
success depended on the promises of growth that a train could deliver.</p>
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-fareast-font-family:Cambria;mso-fareast-theme-font:minor-latin;
### Keybase proof
I hereby claim:
* I am gjtorikian on github.
* I am gjtorikian (https://keybase.io/gjtorikian) on keybase.
* I have a public key whose fingerprint is C1ED A163 FD6B B117 54F6 EC3F 727F AED2 910C 6544
To claim this, I am signing this object:

Hi, my name is @gjtorikian: http://miadzin.org/

How many of you work with DITA/XML? (wait for people to raise their hands)

Ok, and how many of you use a lightweight markup language like Markdown, ReStructuredText, wikis, etc. (wait for more people to raise hands.)

Keep your hands raised. I want people from the first group to go and talk to people from the second group. Share ideas. Exchange words.

I speak to you as someone who's been a writer that transitioned into a doc build person for a large DITA enterprise. I speak to you as someone who has written not one, not two, but three documentation build systems. I've written ant tasks and XSLTs and DTDs for DITA. I've built a tool to validate documentation links and images, and an implementation of conrefs that is very fast. And I've als

@gjtorikian
gjtorikian / homepage_spec.rb
Last active December 5, 2019 20:28
Basic Capybara testing with Jekyll + Rack
require 'spec_helper'
describe "Homepage" do
before :each do
visit "/index.html"
end
it "has a title" do
expect(page).to have_css("h1", text: "GitHub Help")