Skip to content

Instantly share code, notes, and snippets.

View manpages's full-sized avatar

Jonn Mostovoy manpages

View GitHub Profile
@manpages
manpages / index.yaws
Created March 5, 2012 12:28
ЛЯМ-search module used at memorici.de
<erl>
% TODO: Add page compiler
% TODO: RSS for blog
% TODO: Re-write category.php using sed instead of php
%%%% BEGIN CONFIG %%%%
% chroot:
root(A) ->
A#arg.docroot. %++ "/newRoot".
@manpages
manpages / update.php
Created March 6, 2012 00:18
Data preparation script for ЛЯМ-search module used at memorici.de
<?php
/*+++ CONFIG +++*/
$ramfs = '/mnt/ramdisk/';
$dbdir = '/home/sweater/coding/scripting/lyam/data/';
$url = 'http://forum.sc2tv.ru/archive/';
$file = 'index.php?t-14423';
$page_pattern = '|<a .*?>(?<pagenum>\d*)</a>|';
/*--- CONFIG ---*/
@manpages
manpages / double_linked_list.c
Created March 9, 2012 02:31
Double linked list
#include <stdlib.h>
#include <stdio.h>
/**
* please put the stuff that needs to be in .h
* file in the header file. anyway, that shit
* serves educational purposes and shall not be
* used anywhere. the purpose of that shit is
* to demonstrate the concept of iterators in C99
* DELETEME: test of how does gist time line behave
*/
@manpages
manpages / PKGBUILD
Created March 13, 2012 13:39
PKGBUILD fix for leechcraft-git
pkgname=leechcraft-git
pkgver=20120313
pkgrel=1
pkgdesc="Opensource network client providing a full-featured web browser, BitTorrent client and much more."
arch=('i686' 'x86_64')
url="http://leechcraft.org"
license=('GPL3')
depends=('qt>=4.6' 'libtorrent-rasterbar>=0.15.0' 'phonon' 'qross' 'qjson' 'qscintilla' 'qxmpp-leechcraft-git' 'qca' 'qca-gnupg' 'curl' 'qwt')
makedepends=('gcc' 'boost' 'make' 'cmake' 'git')
conflicts=(leechcraft)
@manpages
manpages / alarm.sh
Created March 13, 2012 14:16
My alarm clock
sleep `expr $SLEEP`h; for j in {1..3}; do for i in {1..70}; do sleep 1 && amixer set Master $i%; done; done
@manpages
manpages / todo.php
Created March 23, 2012 01:51
recursive todo script (verypositive software)
<?
$fp = fopen('todo.tsv', 'r');
while ($line = fgetcsv($fp, 0, "\t")) {
foreach ($line as &$li) $li = trim($li);
unset($li);
if ($line[1]) {
$items[$line[1]] = array(
@manpages
manpages / an_install.sh
Created March 29, 2012 14:24
Install awesome-news w/ yaws web server
#!/bin/bash
# We might want to check deps somehow, though it isn't obligatory
# Leave that to the package manager.
echo "Please make sure these are installed: git, erlang, gcc, make, autoconf"
echo -n "Press enter to continue..."
read
echo "YAWS! incoming!"
git clone git://github.com/klacke/yaws.git
cd yaws
@manpages
manpages / reduced_test_case.erl
Created March 30, 2012 23:23
Yet Another Erlang/Unicode Fuckup
-module(reduced_test_case).
-define(NODEBUG, 1).
-include_lib("eunit/include/eunit.hrl").
-behavior(gen_server).
%-compile(export_all).
-export([init/1, code_change/3, handle_call/3, handle_cast/2, handle_info/2, terminate/2]).
-export([start/0]).
@manpages
manpages / mtg_formats.txt
Created April 2, 2012 05:11
A way to make use of your pile of Magic: the Gathering cards
«Double Rainbow»
You grab 60 times the number of players random cards from your pile and shuffle those.
The rules of the game are modified in that way —
* Players can't search the library,
* If you would draw a card, scry 3 and draw a card instead,
* Any time you could play a land you may remove a card in your hand from the game.
If you do, place a basic land — Plains, Island, Mountain, Forest or Swamp token into play under your control.
* Players share the library.
* If you must draw a card and you can't suffle all the card removed from the game
in order to put land token into the library.
@manpages
manpages / books.org
Created April 28, 2012 04:26
Reading experience

DESCRIPTION

The contents of this file pretty much copy the data that can be obtained from http://goodreads.com/manpages Though I’ll certainly post some reviews here that I won’t post to the goodreads, so feel free to follow this gist if you are interested in the aggregated information on what I read. I have started that log at April 20th and plan to continue writing it for as long as I read books. No spoilers.