Skip to content

Instantly share code, notes, and snippets.

Avatar

Vladimir Grichina vgrichina

View GitHub Profile
View Dijkstra 5 lines
class Edge
attr_accessor :src, :dest, :length
def initialize(src, dest, length = 1)
@src = src
@dest = dest
@length = length
end
end
@vgrichina
vgrichina / gist:1287736
Created Oct 14, 2011 — forked from fennb/gist:1283573
nginx microcaching config example
View gist:1287736
# Set cache dir
proxy_cache_path /var/cache/nginx levels=1:2
keys_zone=microcache:5m max_size=1000m;
# Virtualhost/server configuration
server {
listen 80;
server_name yourhost.domain.com;
# Define cached location (may not be whole site)
View twitter-entities.js
/*
* twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
*
* See the documentation here: http://dev.twitter.com/pages/tweet_entities
* Basically, add ?include_entities=true to your timeline call
*
* Copyright 2010, Wade Simmons
* Licensed under the MIT license
View array.c
//
// array.h - CKit
//
// (c) 2009 TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
//
#ifndef __CKIT_ARRAY__
#define __CKIT_ARRAY__
You can’t perform that action at this time.