Skip to content

Instantly share code, notes, and snippets.

View jashank's full-sized avatar

Jashank Jeremy jashank

View GitHub Profile
### grub configuration for alyzon
#
# I run FreeBSD/amd64 with root-on-ZFS on a Lenovo ThinkCentre M83,
# which has UEFI. At the moment, this configuration is basically
# unsupported (although it's coming soon), but I want to be able to
# use my system. I've had prior experience with Lenovo UEFI boxes
# before (Arch on my ThinkPad T440), and I hate autogenerated GRUB
# configs, so I appropriated my hand-written GRUB config, and extended
# it.
#
@jashank
jashank / README.md
Last active March 20, 2019 19:31
RFC 1345 compose keys

RFC 1345 Compose Keys

The notion of Compose keys are brilliant. I really like the notion of pressing a key, typing a sequence of characters, and out pops a pretty Unicode character. However, the default sequences in X are immensely silly, and in any case, there's already an RFC for this.

RFC 1345 exists to specify a simple way of entering Unicode characters, and it's a crying shame that Compose keys don't use it,

@jashank
jashank / jekyll-kramtoc.rb
Created February 12, 2014 03:25
Kramdown TOC->HTML wrapped in Jekyll
require 'kramdown'
module Jekyll
module Converters
class Markdown
class KramdownParser
attr_accessor :kramdown
DISPATCHER = Hash.new {|h,k| h[k] = "convert_#{k}"}
@jashank
jashank / sitemap.xml
Created December 31, 2013 06:19
jekyll sitemap.xml
---
layout: nil
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
{% for page in site.pages %}
<url>
<loc>{{ site.location }}{{ page.url }}</loc>
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
</url>
@jashank
jashank / PKGBUILD.dbg
Last active December 31, 2015 14:59
The Chrominator
# $Id$
pkgname=chromium-trunk-dbg
provides=('chromium')
pkgver=38.0.2105.0.r285495
pkgrel=1
pkgdesc="The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser"
arch=('i686' 'x86_64')
url="http://www.chromium.org/"
license=('BSD')
Sampling process 1656 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling TextMate (pid 1656) every 1 millisecond
Process: TextMate [1656]
Path: /Users/jashank/Downloads/TextMate.app/Contents/MacOS/TextMate
Load Address: 0x109042000
Identifier: com.macromates.TextMate.preview
Version: 2.0-alpha.9473 (9473)
Code Type: X86-64 (Native)
Parent Process: launchd [315]
@jashank
jashank / Makefile
Created June 26, 2013 23:20
GNU make is broken
PROJECT = foo
include project.mk
@jashank
jashank / gist:5179273
Created March 17, 2013 02:23
Ruby SDL playback (as used in CMG)
# I initialise on L19-22
# let $SAMPLERATE be 48000; I'd like to do this more dynamically, eventually
SDL.init(SDL::INIT_AUDIO)
SDL::Mixer.open($SAMPLERATE, SDL::Mixer::DEFAULT_FORMAT, 2, 8192)
SDL::Mixer.allocate_channels(128)
# Inside the class Channel, I play audio on L68 (cherrypicking salient lines).
# Typically, there exist 64 Channels.
class Channel
attr_accessor :sdl, :num
@jashank
jashank / dancer2test.pl
Created March 12, 2013 07:10
Dancer2::Test misbehaviour
#!/usr/bin/perl -w
use warnings;
use strict;
=head1 NAME
dancer2test.pl -- test code for Dancer2::Test
=head1 SYNOPSIS
@jashank
jashank / prefixdemo.pl
Created October 6, 2012 01:10
Dancer prefix bug: only the first of a set of side-by-side prefixes is accessible
#!/usr/bin/perl -w
use Dancer;
prefix '/a' => sub {
prefix '/b' => sub {
get '/foo' => sub { "Hello!" };
get '/bar' => sub { "Goodbye!" };
};