Skip to content

Instantly share code, notes, and snippets.

View manpages's full-sized avatar

Jonn Mostovoy manpages

View GitHub Profile
@manpages
manpages / lambda_fields.py
Created July 19, 2012 11:38
Superpositional fields of lambda rays (icfpc-2012)
import logging
from world import World
from heapq import heappush, heappop
from test_emulators import run_interactively
class LambdaFields(object):
# fields: [(int LambdaCoordinate, [int] LambdaField)]
# list of individual fields produced by each lambda
# LambdaCoordinate is the 1d coordinate of lambda in the world
# LambdaField is the list of effects that the field has on each of the cells
@manpages
manpages / reddit-sanitize-top.css
Created July 22, 2012 00:40
Reddit top line sanitizer
#sr-header-area div.srdrop > * { display: none !important }
#sr-header-area div.sr-list > * { display: none !important }
#sr-header-area div.sr-list > .sr-bar:nth-of-type(2) { padding-left: 0.5em !important; display: block !important; text-transform:lowercase; font-size: 1.2em; }
#sr-header-area #sr-more-link { display: none !important }
@manpages
manpages / kak_perestat.md
Created July 28, 2012 06:12
Как перестать беспокоиться и начать программировать

как перестать беспокоиться и начать программировать

Про формат мероприятия. (5мин)

  • Я назвал это воркшопом потому, что это не лекция i.e. будем много общаться с аудиторией. Тем не менее у этого воркшопа есть некий план.
@manpages
manpages / my_lsr.sh
Created August 9, 2012 01:38
ls -R for busybox
#!/bin/bash
my_lsr () {
d=$1;
for x in "$d"/* "$d"/.[!.]* "$d"/..?*; do
if test -f "$x"; then
# handler for an ordinary file
eval "$2" "$x"
elif test -h "$x"; then
# handler for a symlink
eval "$2" "$x"
@manpages
manpages / iron_branch.sh
Created August 16, 2012 08:50
Search for a git branch
for x in ./* ; do cd $x; git branch -r | sed "s,^,($x) → ,g"; cd ..; done
@manpages
manpages / TelnetTerminal.py
Created August 18, 2012 03:44
Kerberos' telnet terminal
#!/usr/bin/python
#####################
# TelnetTerminal.py #
#===================#
# By Kerberos #
#####################
import os, sys, telnetlib, getopt, socket
from telnetlib import IAC, NOP
def Init():
@manpages
manpages / config
Created August 23, 2012 12:52
Configuration for distributed usage of mpd with last.fm scrobbling
# ~/.mpd/config
# MPD configuration that enables you to run the server from the userspace
# And to stream music over HTTP so that you could listen it in a distributed fashion (from the office/school)
# Uncomment the commented lines to stream music to the local audio output
# Note that you can have more than one audio outputs enabled!
# Where is my music?
music_directory "/home/mpdaemon/Music"
playlist_directory "/home/mpdaemon/.mpd/playlists"
@manpages
manpages / alarm.sh
Created August 24, 2012 09:45
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 / memoricide-codefest.md
Created August 25, 2012 11:16
Memoricide /codefest/ workflow

Work flow for memoricide /codefest/ project

Glossary (Definitions)

¡TODO!

Work flow description

@manpages
manpages / twitter-rss.md
Created August 26, 2012 00:57
RSS in Twitter

RSS in twitter. Still alive.

http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=github