Skip to content

Instantly share code, notes, and snippets.


Michal Valoušek msgre

  • Valašské Meziříčí, Czech Republic
View GitHub Profile
sixertoy / audio-proxy-server.js
Last active Jun 1, 2022
Simple Audio Streaming Proxy | NodeJS + Express + MP3
View audio-proxy-server.js
* ----
* > yarn add express request
* RUN:
* ----
* > node ./audio-proxy-server
const os = require('os');
apollo13 /
Last active May 12, 2022
Django logging to Firefox/Chrome devtools
License: MIT -
ChromeLogger is a protocol which allows sending logging messages to the Browser.
This module implements simple support for Django. It consists of two components:
* `LoggingMiddleware` which is responsible for sending all log messages
associated with the request to the browser.
* `ChromeLoggerHandler` a python logging handler which collects all messages.
aaronblohowiak / gist:3935007
Created Oct 22, 2012
RedisConf Notes Part IV
View gist:3935007
Redis Pain - Matt @mranney from Voxer (did node-redis)
* Asked to talk about redis stress points.. "no stress, things work for a while and there is no stress and then... you enter a world of pain."
* Pain from how we use it at Voxer. Explanation of Voxer and its use cases.
* People assume Voxer is "how hard can it be?".. "That's how it used to be until we got a bunch of pictures..."
* Growth curve looks like Pinterests "might be the same because there was no label on the y-axis.. might be EXACTLY the same."
* Computers are hard... nothing works as it is supposed to... and eventually you fly into nerd rage and then you become a curmmudgeon... getting serious, this isn't real pain -- we aren't selling stree sheets -- this are great problems to have...
* They use redis as cache for Riak, also for rapidly changing data, "data we can afford to lose", throttling, NO SAVING.
* "We really like redis."
* "When we first started building voxer, I never understood why people use Redis at all... we have a db and .
aaronblohowiak / gist:3934073
Created Oct 22, 2012
RedisConf Notes Part III
View gist:3934073
Lightning talk: BigCache:
* redis distributed fault-tolerant memory cache as a service (OSS)
* memcache binary protocol compatible
* TCP loadbalanced / consistent hashing algo, ZK for coordination services
EvilSha: misadventures in the land of lua. Adam Baldwin: @adam_baldwin
* What can we do that is evil with Redis?
* Listed all functions you have access to in lua in redis; pretty locked-down
aaronblohowiak / gist:3933451
Created Oct 22, 2012
RedisConf Notes Part II
View gist:3933451
Dr Josiah Carlson
- Redis user for 2 1/2 years. Extremely active on redis mailing list, #3 poster to the list (applause from PN)
- Author of Redis In Action (available electronically)
- What is search? scan text, use BM/BMG/KMP or regex or recursive-descent.. or suffix tries.. or you can search through the zip-format (BWT)
- Inverted index: words to documents, instead of crawling documents for words.
- SET per word with items for each docid, using redis' intersection for AND, union for OR
- "Simplest example that will be useful..[but it wont be that useful... buy the book!]"
- Demo of his editor.. its on sourceforge.
- Tokenization, stop words in some python code.. "with this stuff, we're going to implement search" already has failing tests written.. live coding, so not many notes... buy his book.
- "I have 5 minutes? I thought this was a 45-minute talk".. "Nope!"..."Shoot!"
aaronblohowiak / gist:3932768
Created Oct 22, 2012
RedisConf Notes Part I
View gist:3932768
Redisconf Notes:
"We will begin this morning with a performance"
"Is this a key store..." Bohemian Rhapsody Key/Value Store ballad. Epic Win!
"Any way the data flows doesn't really matter to me... flushdb..."
"Lua killed a db by writing after calling a nondeterministic function..."
"Got to leave SQL behind and face the truth..."
"Redis, I don't want to join, sometimes I wish I'd never described a query..."
"The ZSET has some data set aside for me, for me, for MEEEEEEE"
jleclanche /
Created May 13, 2012
Quick python weather script using Google's Weather API
#!/usr/bin/env python
# encoding: utf-8
import sys
from argparse import ArgumentParser
from xml.dom import minidom
from urllib.request import urlopen
from urllib.parse import urlencode
except ImportError:
gudbergur / README.markdown
Created Feb 19, 2012
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things
View README.markdown

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
SergXIIIth / gist:1628715
Created Jan 17, 2012
The first Arduino HTTP request
View gist:1628715
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x00, 0xAB, 0xCB, 0xCD, 0xDE, 0x02 };
IPAddress ip(192,168,0,140);
IPAddress server(173,194,70,103);
EthernetClient client;
starenka /
Created Jun 1, 2011
Become a copywriter w/ NTLK
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generates text based on sample text
# @author: starenka
# @email: 'moc]tod[liamg].T.E[0aknerats'[::-1]
# @version: 1.0.3
# @since 6/1/11
# @depends nltk, BeautifulSoup