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
#! /usr/bin/env bash | |
#use ncal and perl to list weeks in a year range | |
#can also use cal in cygwin | |
#arg 1 year_start | |
#arg 2 year_end | |
#arg 3 mode "cal" # WIP | |
function showhelp() { |
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
find . -iname "*.wav" -exec ffmpeg -i {} -af aformat=s16:44100 {}.flac \; |
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
Assumption: you know how to install dnsmasq, and you have done so. | |
##############################/etc/default/dnsmasq | |
#contains useful information | |
#IGNORE_RESOLVCONF=yes | |
##############################/etc/resolv.conf | |
domain home | |
search home | |
nameserver 127.0.0.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
#In Geany, open the snippets.conf file: Tools→Configuration Files→snippets.conf | |
#add these entries | |
[Special] | |
bracescompact={my $p=shift; my $rv=0; if(\s$p eq "something"\s) {\s%cursor%\s; $rv=1; } return $rv; }\n | |
[Perl] | |
if=if (\s%cursor%\s)%bracescompact% | |
sub=sub mySub %bracescompact% | |
package=package myPkg {\n\tsub new {my ($class,$name)=@_;\n\tmy $self={\n\tval1=>$name||$class,\n\tval2=>"default",\n\tval3=>()\n\t};\n\tmy $obj=bless $self,$class;\n\t$obj->_init;\n\treturn $obj;\n\t}\n\tsub _init %bracescompact%\n};\n |
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
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
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
package main | |
import ( | |
"bufio" | |
"net" | |
) | |
type Client struct { | |
incoming chan string | |
outgoing chan string |
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
Rip entire audio CD to a single file ("bin" format), playable by mplayer. | |
Good for classical music, jazz, and other music that is best listened to "whole". | |
On Linux: easy to do. | |
On M-Windows: takes time to *find* the binary tools or compile them yourself. | |
Tools to use: | |
dd | |
toc2cue (comes with cdrdao) | |
bchunk |
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 | |
#find lib/ -type f -name "*.pm" | while read file; do ./pcritic_shell.sh "$file"; done | |
OFILE=critic_out.txt | |
echo Process $1 | |
echo "= = = = = = = =" >> $OFILE | |
echo "= = = = = = = =" >> $OFILE |