Skip to content

Instantly share code, notes, and snippets.

solusipse / gist:8870916
Created February 7, 2014 20:18
Python 3 - env for Pyramid
python3.3 -m venv app-env
cd app-env/
source bin/activate
curl -O
bin/easy_install pyramid
bin/pcreate -s alchemy app
cd app
python develop
cd ..
solusipse / gist:8961347
Created February 12, 2014 18:15
pyramid - HTTPFound get method
url = request.route_url('home', _query={'login': 'invalid'})
return HTTPFound(location=url)
solusipse /
Last active August 29, 2015 14:00
Youtube to webm converter
Sample usage:
python -s 01:45 -l 5
This will create webm file from youtube video from 01:45 to 01:50
import youtube_dl, subprocess, os, argparse
class Downloader:
solusipse /
Last active August 29, 2015 14:00
Getting wlan connecting on Arch fresh install (Raspberry Pi)

Raspberry Pi: wireless connection

This document will help you to establish wireless network connection without installing any programs and then, configure wicd that manages connections automatically.

Basic connection

List all net devices:

solusipse /
Created May 3, 2014 19:21
Arch Linux on Raspberry Pi: RPi as xbmc station

#Arch Linux on Raspberry Pi: RPi as xbmc station#

Let's start from creating xbmc user:

useradd -m -s /bin/bash xbmc

Install necessary packages:

pacman -Syu xorg xorg-xinit xbmc slim

dll and lib files from mingw:

rename to libraryname.dll

lib /machine:i386 /def:libraryname.def
solusipse / gist:fe4e29a190f625297726
Created October 25, 2014 18:58
delete old mails from junk
find /home/vmail/*/*/.Junk/cur/* -mtime +14 -exec rm {} \;
solusipse / grubmanual
Last active August 29, 2015 14:23
manual booting with grub
set root='(hd0,1)'
linux /boot/vmlinuz-linux root=/dev/sda1
initrd /boot/initramfs-linux.img
solusipse /
Created June 22, 2015 11:05
Own DDNS service on Digital Ocean
This script was made for using a Digital Ocean's droplet as a ddns service.
[!] Remember to put your credentials below.
[!] Script needs requests library. To install it use pip: pip install requests.
Before you'll start, check if it works properly with your config. Simply run it:
solusipse /
Created June 28, 2015 03:00
Geovision camera (GV-MFD520) RTSP streaming to linux machine

For a while, I used an ftp connection to download videos from my geovision camera (used in home surveillance system). But due to often power outages in place where I live, I had constantly repeating problems with an sd card which was used as an intermediary between camera and linux-powered station. It made me to look for other solutions. I switched to RTSP protocol and now it works flawless. If you're a geovision camera owner and building your own recording station, you might find that draft helpful. First of all, you have to enable RTSP server in your camera's panel. Then you can for example use VLC to check if it works properly. In my case proper address of stream was: rtsp:// I used cron to execute script with such line every 10 minutes: avconv -i rtsp:// -c copy -t 610 /mnt/videos/$(date "+%d-%m-%Y-%H:%M:%S").mp4 610 is for time here (610 seconds). Extra 10 seconds are just in case, sometimes first 3-5 seconds are broken. I also configured nginx to