Skip to content

Instantly share code, notes, and snippets.

View Profpatsch's full-sized avatar
🌮

Profpatsch

🌮
View GitHub Profile
#!/bin/bash
# Takes recipient as first and URL to watch as second argument.
# Will create a file in the folderto compare the last state
# with the current one.
RECIPIENT=$1
URL=$2
FILENAME=$(echo "$URL" | sed -e 's,/,*,g')
if [ ! -e "$FILENAME" ]; then
class Pattern:
_points = set()
def _init__(self, points):
self._points = points
class Circle(Pattern):
def __init__(self, r):
ps = set()
# compute every point for that radius
@Profpatsch
Profpatsch / redditrss->irc
Created March 17, 2015 17:04
redditrss->irc
{
"Bees":[
{
"Name":"ircbee_freenode",
"Class":"ircbee",
"Description":"ircbee connected to freenode, channel #beehive",
"Options":[
{
"Name":"server",
"Value":"irc.freenode.net"
@Profpatsch
Profpatsch / test.nix
Last active November 17, 2015 13:56
mkDerivation test
# put it in the nixpkgs root folder
let
l = import ./lib;
# build a simple (imperfect) stdenv
stdenv = ((import ./pkgs/stdenv)
{ system = "x86_64-linux"; platform = null; config = {}; lib = l; }).stdenv;
in rec {
# two packages, one broken and one not. It should be possible to access metadata in the broken one.
@Profpatsch
Profpatsch / PKGBUILD_mutt-sidebar-lunar
Created February 6, 2013 15:34
PKGBUILD for mutt with Lunar Linux sidebar patch.
## PKGBUILD [plain_text]
# Contributor: tobias [tobias [at] archlinux.org]
# Additional : Profpatsch [https://bbs.archlinux.org/misc.php?email=68112]
pkgname=mutt-sidebar
pkgver=1.5.21
pkgrel=8
pkgdesc='Small but very powerful text-based mail client'
url='http://www.mutt.org/'
license=('GPL')
@Profpatsch
Profpatsch / all-packages.nix
Last active December 13, 2015 00:24
QT packaging
cutegram =
let f = ../applications/networking/instant-messengers/telegram;
cp = qt5Libs.callPackage;
# templorary all three packages in attrset, for bettor debugging
# in cp "${f}/cutegram" rec {
in rec {
cutegram = cp "${f}/cutegram" {inherit libqtelegram-aseman-edition telegram-qml;};
libqtelegram-aseman-edition = cp "${f}/libqtelegram-aseman-edition" { };
telegram-qml = cp "${f}/telegram-qml" { inherit libqtelegram-aseman-edition; };
};
# Contributor: Calum Macdonald <calum.asu AT gmail DOT com>
# Patch update: Profpatsch [https://bbs.archlinux.org/misc.php?email=68112]
pkgname=playdar-core
pkgver=current
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="Playdar is a music content resolver service - run it on every computer you use, and you'll be able to listen to all the songs you would otherwise be able to find manually by searching though all your computers, hard disks, online services, and more"
url="http://www.playdar.org/"
license=('GPL3')
depends=('erlang' 'git' 'taglib' 'gcc')
--- playdarctl 2013-02-13 17:06:05.958736728 +0100
+++ playdarctl 2013-02-13 17:09:07.982824648 +0100
@@ -35,7 +35,12 @@
ERL_OPTS="+K true +P 1000000"
EBIN_DIR="ebin"
PLAYDAR_OPTS="-s playdar -sname ${ENAME}@localhost -pa ${EBIN_DIR} -boot start_sasl"
-PLAYDAR_LOG_DIR=.
+if [[ -d ~/.playdar/ ]]; then
+ PLAYDAR_LOG_DIR=~/.playdar/
+else
# Contributor: dawn <crackofdusk at gmail ... com>
# Update: Profpatsch [https://bbs.archlinux.org/misc.php?email=68112]
pkgname=performous-git
pkgver=20130217
pkgrel=1
pkgdesc="Karaoke game"
arch=('i686' 'x86_64')
url="http://performous.org"
license=('GPL')
depends=('boost' 'sdl' 'ffmpeg' 'cairo>=1.2' 'librsvg' 'glew' 'libxml++' 'portaudio' 'imagemagick')
# Maintainer: Cloudef <mailroxas@gmail.com>
# Lightweight clipboard manager for X
pkgname=loliclip
pkgver=2.4
pkgrel=6
pkgdesc='Lightweight clipboard manager for X'
arch=('i686' 'x86_64')
url='http://cloudef.eu'
license=('WTFPL')