Skip to content

Instantly share code, notes, and snippets.

@scollett
scollett / gollum.config.ru
Last active July 20, 2017 07:38
A lightweight author identification for Gollum wiki (with some preferences). Use config.ru to run Gollum as a rack application. Basic HTTP Authentication is commented out.
#!/usr/bin/env ruby
require 'rubygems'
require 'gollum/app'
gollum_path = File.expand_path(File.join(File.dirname(__FILE__), 'database.git')) # CHANGE THIS TO POINT TO YOUR OWN WIKI REPO
Precious::App.set(:gollum_path, gollum_path)
Precious::App.set(:default_markup, :markdown) # set your favorite markup language
Precious::App.set(:wiki_options, {:live_preview => false, :universal_toc => false, :user_icons => 'gravatar'})
module Precious
class App < Sinatra::Base
# Creates a simple authentication layer
@ikegami-yukino
ikegami-yukino / train.patch
Last active February 5, 2018 16:20
LIBLINEAR1.93のcross validationオプションでprecision/recallを出力する
--- train.c 2012-10-29 01:46:32.000000000 +0900
+++ train-new.c 2013-02-12 19:53:21.000000000 +0900
@@ -135,10 +135,14 @@
void do_cross_validation()
{
int i;
- int total_correct = 0;
double total_error = 0;
double sumv = 0, sumy = 0, sumvv = 0, sumyy = 0, sumvy = 0;
double *target = Malloc(double, prob.l);
@mbostock
mbostock / .block
Last active November 22, 2022 23:32
Line Transition
license: gpl-3.0