Archive for January, 2010
For Windows DropBox users. Here is a simple way to share list of links for your Public folder. This script doesn’t show files in sub-directories.
1. Create a makefilelist.bat file with script to list all files in directory.
2. Use Scheduled Tasks to run the .bat file Daily or Weekly, etc as needed; depending on how often you update files in DropBox Public.
3. Share the list file with “Copy Public Link”.
4. Open Public Link in a browser. You know have a list of all public files that is up-to-date.
You can see an example and download the makefilelist.bat file here:
http://dl.dropbox.com/u/4355901/index.html
The description from asterisk for this is GotoIf(condition?[labeliftrue]:[labeliffalse]), however for me (being somewhat new to asterisk, and not fully understanding all the little bits, this was a bit confusing. A better way of describing this, at least for those of use new to asterisk, might be GotoIf(condition?[context,priority,labeliftrue]:[context,priority,labeliffalse]).
I have not used labels in the dial plan before, and when starting out with this application I read label to be a context. This lead me to write my dial plan similar to this..
[default] exten => 100,1,GoToIf(condition?true,false) [true] exten => s,1,... [false] exten => s,1,...
In retrospect, it’s obvious what the documentation is saying, but as I said, not being familiar with labels, I was a bit lost.
Had a need to capture some traffic on the remote machine and analyze it in Real Time ™. Found to solutions to this. The first, involved just sending the output of tcpdump across the ssh session.
ssh host.example.org tcpump - eth0 -w - > capture.pcap
The other method, picked up from the wireshark wiki allows for the captured traffic to be viewed as it’s being captured in wireshark. This is done using a combination of ssh and a fifo pipe. The exact command can very slightly, and I suggest reading the relevant man pages, but something similar to the following (taken from their wiki) should do the trick.
mkfifo /tmp/pipe
ssh user@remote-host "tshark -w - not port 22" > /tmp/pipe
wireshark -k -i /tmp/pipe
