Skip to content

Instantly share code, notes, and snippets.

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #
@al3x
al3x / newpost.rb
Created April 22, 2009 23:50
Handy new post script for Jekyll blogs or similar
#!/usr/bin/env ruby
unless ARGV[0]
puts 'Usage: newpost "the post title"'
exit(-1)
end
date_prefix = Time.now.strftime("%Y-%m-%d")
postname = ARGV[0].strip.downcase.gsub(/ /, '-')
post = "/Users/al3x/src/al3x.github.com/_posts/#{date_prefix}-#{postname}.textile"
example { foo =>
bar // this first line indents correctly
baz // but what happened here?
} // this isn't correct either
def javaDirectoryPath = "src_managed" / "main" / "java"
def rubyDirectoryPath = "src_managed" / "main" / "ruby"
def thriftDirectoryPath = "src_managed" / "main" / "thrift"
def thriftFile = thriftDirectoryPath / "YourThriftDealie.thrift"
def thriftTask(tpe: String, directory: Path, thriftFile: Path) = {
val cleanIt = cleanTask(directory) named("clean-thrift-" + tpe)
execTask {
// you can do "thrift ...".format and pass a String here instead of inline xml
<x>thrift --gen {tpe} {directory.absolutePath} {thriftFile.absolutePath}</x>
1 whole chicken – no more than 4lbs. (about 3.5lbs is a perfect size)
· Cast iron skillet
· Paper towels/saran wrap
· Dish that fits chicken (can be any sort – Tupperware, baking dish, etc.)
· Salt and pepper
@al3x
al3x / gist:967060
Created May 11, 2011 18:49 — forked from 3n/gist:967051
A "blog" "post" about asynchronous script loading and MooTools.

A lot of talk at JSConf was on the use of modules: AMD, CommmonJS, or otherwise. Since the server-side JavaScript world has this mostly covered, a more heavily discussed topic was bringing the joys of modularity to the client-side. This, of course, is a tricky thing to do since loading scripts requires some sort of relatively slow and possibly asynchronous network request. How does one balance the issues of perceived latency, JS execution (UI blocking), page weight, and code tidiness? I spent some time looking into this and here's my first stab at a solution (no I'm not releasing some open source project shut up).

Real quick: if you don't agree that splitting files to do asynchronous loading is a good idea you should read more.

I code most of my projects in MooTools (including my current project, BankSimple, so modularity is a given for me. MooTools is

- configurable keyboard shortcuts for switching between tabs and initiating uploads and video chats
- menubar items for available commands on Mac OS X (ex: there should probably be a “Room” menubar item)
- use color to differentiate the right sidebar, ideally inheriting the default sidebar/source list color from the OS
- cache files and links so they don’t have to awkwardly reload when you bring up the “Files & Links” tab
- make font size configurable
- allow searching in the AIR app
- possibly out of your control, but the AIR client uses a non-trivial amount of CPU when idle (spiking up to 3 – 5%); that’s probably more than it should use, even for polling

/* NOTE this file is autogenerated by Scalate : see http://scalate.fusesource.org/ */
package Application
import _root_.scala.collection.JavaConversions._
import controllers._;import models._;import play.utils._
object $_scalate_$index_ssp{
def $_scalate_$render($_scalate_$_context:_root_.org.fusesource.scalate.RenderContext): Unit = {
val context:org.fusesource.scalate.DefaultRenderContext = ($_scalate_$_context.attributes.get("context") match {
case Some(value) => value.asInstanceOf[org.fusesource.scalate.DefaultRenderContext]
Flying Lotus - Lit Up (Instrumental)
Phaseone - Cadence + Athena
Gary Numan - Films
Hovatron - Gypsy Trader
The Field - The More That I Do (Foals remix)
Surfs - Tu Seras Mi Baby
The Very Best - Cape Cod Kwassa Kwassa
Orchestre N'guewel - Mi Guajeo
Harvard Bass - 81 (Renaissanceman remix)
Znobia - Tchilo (Diplo remix)