Skip to content

Instantly share code, notes, and snippets.

@jasp
jasp / tooggandpad
Created September 27, 2009 11:44
Using sox (http://sox.sourceforge.net/) to convert to ogg and pad 0.25 seconds. The script takes the files to convert as parameters. It's a bit quick and dirty so it won't accept filenames with spaces, and can't work from ogg source files.
#!/bin/sh
FILES="$@"
for filename in $FILES
do
newname=`echo $filename | sed -e 's/\(.*\)\.[a-zA-Z0-9]*$/\1.ogg/g'`
sox $filename $newname pad 0 0.25
done
@rondevera
rondevera / css-to-select-range-of-children.html
Last active February 8, 2023 11:29
CSS selector for a range of children
<!DOCTYPE html>
<html>
<head>
<style>
/* How to select a range of children
* (Here, 3rd-7th children, inclusive):
*/
ul li:nth-child(n+3):nth-child(-n+7) {
outline: 1px solid #0f0;
}