Skip to content

Instantly share code, notes, and snippets.

View kahlil's full-sized avatar

Kahlil Lechelt kahlil

View GitHub Profile
@kahlil
kahlil / _config.yml
Created June 18, 2011 13:50 — forked from edavis10/_config.yml
Pagination in Jekyll
# ....other stuff here
paginate: 10
@kahlil
kahlil / sublime-shortcuts.md
Created July 2, 2012 08:25 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)

h2. General

  • ⌘T go to file
  • ⌘⌃P go to project
  • ⌘R go to methods
  • ⌃G go to line
  • ⌘KB toggle side bar
  • ⌘⇧P command prompt
@kahlil
kahlil / gist:3141634
Created July 19, 2012 08:43 — forked from idan/gist:3135754
A Sample Post

Hello there! This is a sample post for gist.io, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.

@kahlil
kahlil / new.rb
Created July 22, 2012 13:27 — forked from clauswitt/new.rb
#!/usr/bin/env ruby
# Script to create a jekyll blog post using a template and open it in textmate. It takes one input parameter
# which is the title of the blog post
# e.g. command:
# $ ./new.rb "helper script to create new posts using jekyll"
#
# Author:Khaja Minhajuddin (http://minhajuddin.com)
# Minor tweaks by Claus Witt (http://www.clauswitt.com)
@kahlil
kahlil / gist:3689406
Created September 10, 2012 07:23 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@kahlil
kahlil / gist:3762397
Created September 21, 2012 16:15 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@kahlil
kahlil / rss-subscribers.sh
Created September 26, 2012 08:18
Bash script to parse Apache log on your Uberspace account for a count of RSS subscribers and email it to you
#!/bin/bash
# Schedule this to run once a day with cron. Doesn't matter what time since it parses yesterday's hits (by default).
# I only tested this on the Marco.org server, which runs CentOS (RHEL). No idea how it'll work on other distributions, but it's pretty basic.
# Required variables:
RSS_URI="/rss"
MAIL_TO="your@email.com"
LOG_FILE="/home/[UBERSPACE_USERNAME]/logs/access_log"
@kahlil
kahlil / rss-subscribers.sh
Created October 1, 2012 12:17 — forked from drdrang/rss-subscribers.sh
Bash script to parse Apache log for a count of RSS subscribers and email it to you
#!/bin/bash
# Schedule this to run once a day with cron. Doesn't matter what time since it parses yesterday's hits (by default).
# I only tested this on the Marco.org server, which runs CentOS (RHEL). No idea how it'll work on other distributions, but it's pretty basic.
# Required variables:
RSS_URI="/rss"
MAIL_TO="your@email.com"
LOG_FILE="/home/[UBERSPACE_USERNAME]/logs/access_log"
@kahlil
kahlil / promises.md
Created October 22, 2012 12:39 — forked from domenic/promises.md
You're Missing the Point of Promises

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
    // the rest of your code goes here.
});
@kahlil
kahlil / index.html
Created February 13, 2013 13:15 — forked from darwin/index.html
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">Comix Sample</tspan>
</label>
<actor t="translate(131,49)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-18,59|-6,79|-1,59">