This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ------------------------------------------------------ | |
ver: 0.2 | |
Validación de formularios con el soporte para NET | |
---------------------------------------------------------- | |
autor Kamil Selwa 09.03.2010 | |
---------------------------------------------------------- | |
requiere jquery > 1.2.3 http://jquery.com | |
----------------------------------------------------------- | |
incorporadas reglas de validación: | |
required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#FFmpeg | |
downsample many mp3 many files | |
for i in *.mp3; do ffmpeg -i "$i" -ac 1 -ab 64000 -ar 22050 "${i%.mp3}-64kbps.mp3"; done | |
#concat many files | |
ffmpeg -safe 0 -f concat -i <(find . -type f -name '*' -printf "file '$PWD/%p'\n" | sort) -c copy output.mkv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
class HoneypotFormMixin(object): | |
"""Keep away spam bots trying to submit name""" | |
def __init__(self, *args, **kwargs): | |
super(HoneypotFormMixin, self).__init__(*args, **kwargs) | |
self.fields.update( | |
{"name": forms.CharField(required=False)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
filename=$(basename "$1") | |
segment_times=$2 | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
output=$2_$filename.jpg | |
ffmpeg -ss $2 -i "$1" -vframes 1 -q:v 2 "$output" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
START=$(date +%s); | |
filename=$(basename "$1") | |
segment_times=$2 | |
extension="${filename##*.}" | |
filename="${filename%.*}" | |
output=$filename_%d.$extension | |
ffmpeg -i "$1" -f segment -segment_times "$segment_times" -vcodec copy -acodec copy "$output" | |
END=$(date +%s); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dev="DV1" | |
guid="0800460104f1381b" | |
format="avi" | |
f="$dev-`date +%Y-%m-%H.avi`" | |
echo "Processing $f file..." | |
# save as dv :demux=rawdv | |
# dvgrab --format dv2 -guid $guid - | vlc - --sout="#duplicate{dst=display,dst=standard{access=file,mux=avi,dst=\"$f\"})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""Add permissions for proxy model. | |
This is needed because of the bug https://code.djangoproject.com/ticket/11154 | |
in Django (as of 1.6, it's not fixed). | |
When a permission is created for a proxy model, it actually creates if for it's | |
base model app_label (eg: for "article" instead of "about", for the About proxy | |
model). | |
What we need, however, is that the permission be created for the proxy model | |
itself, in order to have the proper entries displayed in the admin. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Default Item Styles - Schema darky] | |
Alert=ffda4453,ffda4453,1,,,,fffae9eb,-,,--- | |
Annotation=ff7f8c8d,ffbdc3c7,,,,,-,-,,--- | |
Attribute=ff2980b9,fffdbc4b,,,,,-,-,,--- | |
Base-N Integer=fff67400,fff67400,,,,,-,-,,--- | |
Built-in=ff7f8c8d,ffbdc3c7,,,,,-,-,,--- | |
Character=ff3daee9,fffcfcfc,,,,,-,-,,--- | |
Comment=ff7f8c8d,ffeff0f1,,,,,-,-,,--- | |
Comment Variable=ff7f8c8d,ffbdc3c7,,,,,-,-,,--- | |
Constant=ff31363b,ffeff0f1,1,,,,-,-,,--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://rootprompt.apatsch.net/2013/02/20/raspberry-pi-network-audio-player-pulseaudio-dlna-and-bluetooth-a2dp-part-1-pulseaudio/ | |
#https://github.com/volumio/Volumio2/issues/159 | |
#https://github.com/masmu/pulseaudio-dlna | |
# Set pulse daemon config | |
cat <<EOF > /etc/default/pulseaudio | |
PULSEAUDIO_SYSTEM_START=1 | |
DISALLOW_MODULE_LOADING=0 | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Default Item Styles - Schema k1000 (dark)] | |
Alert=ffbf0303,ffbf0303,1,,,,fff7e6e6,-,,--- | |
Base-N Integer=ff985e95,ff985e95,1,,,,-,-,,--- | |
Character=ff985e95,ff985e95,1,,,,-,-,,--- | |
Comment=ff3c404e,ff3c404e,0,1,,,-,-,,--- | |
Data Type=ffb56a6b,ffb56a6b,0,,,,-,-,,--- | |
Decimal/Value=ff985e95,ff985e95,1,,,,-,-,,--- | |
Error=ffbf0303,ffbf0303,0,0,0,,-,-,,--- | |
Floating Point=ff985e95,ff985e95,1,,,,-,-,,--- | |
Function=ff445f9b,ff644a9b,,,,,-,-,,--- |