Skip to content

Instantly share code, notes, and snippets.

View idispatch's full-sized avatar

Oleg Kosenkov idispatch

View GitHub Profile
#!/usr/bin/env python
# Collected and testing code written by Yu-Jie Lin
# Blog: http://blog.yjl.im/2013/08/autovivification-in-python.html
# Gist: https://gist.github.com/livibetter/6258145
from __future__ import print_function
# http://code.activestate.com/recipes/537637/
# @ 2007-12-19 by Mirko Dziadzka
class auto_dict(dict):
@idispatch
idispatch / di-fm-premium-account-generator.sh
Created January 7, 2016 17:35 — forked from hackruu/di-fm-premium-account-generator.sh
Generate di.fm premium account and playlist. Also supports radiotunes.com (ex sky.fm) and jazzradio.com.
#!/bin/bash
AGENT="AudioAddict-di/1.4.7 iOS/8.1"
COOKIES="./cookies.txt"
AUTH="ephemeron:dayeiph0ne@pp"
DOMAIN=gmail.com
PLAYLISTDI="di.fm.m3u"
PLAYLISTSKY="sky.fm.m3u"
PLAYLISTJAZZ="jazzradio.m3u"
PLAYLISTROCK="rockradio.m3u"
JSONDI="http://listen.di.fm/premium_high.json"
@idispatch
idispatch / DI.m3u
Created January 24, 2016 07:32 — forked from sim642/DI.m3u
Digitally Imported premium streams
#EXTM3U
#EXTINF:-1,Digitally Imported - Ambient
http://pub1.diforfree.org:8000/di_ambient_hi
#EXTINF:-1,Digitally Imported - Big Room House
http://pub1.diforfree.org:8000/di_bigroomhouse_hi
#EXTINF:-1,Digitally Imported - Breaks
http://pub1.diforfree.org:8000/di_breaks_hi
#include <bsl_vector.h>
#include <bsl_string.h>
#include <bsl_iostream.h>
#include <bdlb_variant.h>
#include <ball_administration.h>
#include <ball_defaultobserver.h>
#include <ball_loggermanagerconfiguration.h>
#include <ball_loggermanager.h>
#include <ball_severity.h>
#include <ball_log.h>
#include <string>
#include <iostream>
#include <map>
typedef std::map<std::string, std::string> Defines;
bool evaluate(const Defines& defines, std::string *value) {
std::string::reverse_iterator i = value->rbegin();
std::string::iterator e = value->end();
while (i != value->rend()) {
# REPLACED BY: https://github.com/eruffaldi/cmakego
# assuming to ave the correct find_package above ...
# requires CMakew 3.0 for supporting INTERFACE library type
if(ZeroMQ_FOUND)
add_library(p::zeromq INTERFACE IMPORTED)
set_property(TARGET p::zeromq PROPERTY INTERFACE_LINK_LIBRARIES ${ZeroMQ_LIBRARY})
set_property(TARGET p::zeromq PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${ZeroMQ_INCLUDE_DIR}")
endif()
@idispatch
idispatch / go.mod
Created September 3, 2021 13:02
Preprocessor
module preprocessor
go 1.16
require github.com/stretchr/testify v1.7.0 // indirect