Skip to content

Instantly share code, notes, and snippets.

View jnv's full-sized avatar

Jan Vlnas jnv

View GitHub Profile
@whitequark
whitequark / gist:2622705
Created May 6, 2012 14:48
a piece of modern art
(3995:lookup-switch 3523 [3307, 3307, 3307, 3337, 3337, 3337, 3337, 3337, 3491, 3491, 3491, 3491, 3491, 3491, 3491, 3523]
(ternary
(3560:===
(3558:bit-or
(3555:lshift
(3551:integer 46)
(3553:integer 16))
(3556:integer 14))
(3559:get-local 3))
(3564:integer 0)
@jtsagata
jtsagata / Readme
Created July 12, 2012 00:27
Linux rails-footnotes sublime-text-2
copy handler to /usr/local/bin
copy desktop file to /usr/share/applications
sudo update-desktop-database
@Carreau
Carreau / slideshow.js
Created July 12, 2012 12:25
Slideshow mode of Notebook
<div id='presentation_mode'>
<style>
.pmode{ display: none !important }
</style>
<script>
grp=0;
pmode = function(){
init()
cells = $('.cell')
@matthewp
matthewp / gist:3099268
Created July 12, 2012 16:50
XMLHttpRequest wrapped into a promise
function xhr(options) {
var deferred = Q.defer(),
req = new XMLHttpRequest();
req.open(options.method || 'GET', options.url, true);
// Set request headers if provided.
Object.keys(options.headers || {}).forEach(function (key) {
req.setRequestHeader(key, options.headers[key]);
});
@danparsons
danparsons / gist:3195652
Created July 29, 2012 01:46
How to stream the London 2012 Olympics

How to stream the London 2012 Olympics

There have been several HOWTOs posted regarding streaming the 2012 Olympics using HTTP / SOCKS proxies via SSH and other similar methods. None of these actually work using the latest Flash on Mountain Lion (with Firefox, Chrome or Safari). Additionally, the third-party streaming sites don't provide BBC's amazing interface, which lets you quickly skip to individual competitors and events. However, setting up an OpenVPN server does work, with some tweaks. You'll get the exact same UX that people in England receive.

@jirutka
jirutka / rules-both.iptables
Created September 18, 2012 12:42
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@antonio
antonio / 1.9.3-p286-perf
Created October 22, 2012 17:32
Ruby 1.9.3-p286 with the latest falcon patch
build_package_combined_patch() {
local package_name="$1"
{
curl https://raw.github.com/gist/3721565/falcon.patch | patch -p1
autoconf
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
make -j 8
make install
} >&4 2>&1
@josefslerka
josefslerka / dh7.R
Last active October 13, 2015 05:48
Digital Humanities 7
library(tm)
library(textcat)
library(tm)
library(tau)
library(openNLP)
inspect(havel[1:2])
havel[[1]] #pristup ke konkretnimu dokumentu
@josefslerka
josefslerka / gist:4195326
Created December 3, 2012 14:23
Digital Humanities 8 - Text mining
#
#
# https://sites.google.com/site/genbiovis/code/network
#
# natazeni knihovny
library(tm)
# nacteni korpusu
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google