Skip to content

Instantly share code, notes, and snippets.

View 130db's full-sized avatar
💭
Read-Only

130db 130db

💭
Read-Only
View GitHub Profile
@130db
130db / Icecast config
Created August 1, 2013 09:54
How to split Icecast config file in smaller chunks and include them as entities
Lets say you have a lots of predefined mountpoints. Move them to separate XML file mount-points.xml
At the beggining of icetcast.xml add
<!DOCTYPE icecast [
<!ENTITY mounts SYSTEM "mount-points.xml">
]>
and then add reference to mounts somewhere within your configuration file
&mounts;
@130db
130db / Icecast config
Created August 1, 2013 09:54
How to split Icecast config file in smaller chunks and include them as entities
Lets say you have a lots of predefined mountpoints. Move them to separate XML file mount-points.xml
At the beggining of icetcast.xml add
<!DOCTYPE icecast [
<!ENTITY mounts SYSTEM "mount-points.xml">
]>
and then add reference to mounts somewhere within your configuration file
&mounts;
@130db
130db / liquidsoap-sound-processing
Last active December 15, 2022 23:43
This piece of Liquidsoap is written by me and used by Pieci http://pieci.lv. I would appreciate, if you have an idea how to improve it. You can hear it at work on Pieci live streaming.
#
# Pieci / 5 koncerti sound processing
# http://pieci.lv
#
# Author: Aigars Sukurs <aigars@130db.lv>
# Copyright: (C) 2013 130DB
# Licence: MIT
#
s = ladspa.gate(s, threshold = -60.0, attack = 0.15, hold = 1.0, decay = 200.0, range = -25.0)
@130db
130db / echo + cat + ssmtp
Last active December 19, 2015 04:28
Mail from command line
# apt-get insall ssmtp
# vim /etc/ssmtp/ssmtp.conf
~ Start ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster
@130db
130db / Liquidsoap + Ladspa
Created May 14, 2013 15:38
If you ever need liquidsoap and ladspa plugins
apt-get install liquidsoap liquidsoap-plugin-flac liquidsoap-plugin-faad liquidsoap-plugin-icecast liquidsoap-plugin-ladspa liquidsoap-plugin-lame liquidsoap-plugin-lo liquidsoap-plugin-samplerate liquidsoap-plugin-taglib liquidsoap-plugin-theora liquidsoap-plugin-gavl liquidsoap-plugin-gd liquidsoap-plugin-graphics tap-plugins swh-plugins
highlight OverLength ctermbg=none ctermfg=red cterm=bold,underline guibg=#E53B2C
match OverLength /\%>80v.\+/
@130db
130db / mmv
Last active December 16, 2015 16:59
Move multiple files and/or directories at once to provided or predefined location. Mainly I use this script to clean up home or any other directory. This is why destination folder by default is .clean
#!/bin/sh
#
# mmv - move multiple files and/or directories at once
#
# Usage:
# mmv [-h] [-d DESTINATION] file1 [file2 file3 ...]
#
# Written by Aigars Sukurs <aigars@130db.lv>
#
@130db
130db / gist:5433651
Last active December 16, 2015 12:19
Multiling settings for Android. Latvian / Dvorak
MLK_Settings_Begin
__ns::true::B
__vib::10::S
__mtt::500::S
__tl::0::S
__swp::false::B
__tr::6::S
__sym2::="'+-:?/[]{}::S
__lpe::2::S
__br::0::S
@130db
130db / post-update
Created April 18, 2013 23:48
GIT post-update hook for gitalized web. Update master branch only when it's pushed to repositary
#!/bin/sh
host="api"
domain="example.com"
sites="/path/to/your/sites"
site="$sites/$host.$domain"
cd "$site" || exit
unset GIT_DIR
@130db
130db / .inputrc
Created April 18, 2013 23:38
Useful .inputrc for bash. Ubuntu & Mac OS
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[1~": beginning-of-line
"\e[4~": end-of-line
set show-all-if-ambiguous on
set completion-ignore-case on