LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

File conversion script

Posted 12-29-2012 at 10:04 AM by Snark1994
Updated 12-29-2012 at 10:10 AM by Snark1994

A handy script I put together to automatically convert between file formats based on file extension, in an easily extensible manner:

Code:
#!/usr/bin/env bash

#Conversion rules:
# commands["extension_from extension_to"]="convert_command"
# INFILE and OUTFILE in the conversion command are replaced
# with the appropriate filenames

declare -A commands
commands["wav mp3"]="ffmpeg -i INFILE OUTFILE"
...
Senior Member
Posted in Uncategorized
Views 1496 Comments 0 Snark1994 is offline
Old

Quick and dirty plotting with Haskell + Gnuplot

Posted 12-28-2012 at 05:13 PM by hydraMax (Bits and Pixels)
Updated 12-28-2012 at 05:17 PM by hydraMax
Tags haskell

Assuming you are a Haskeller, you can get a simply x-y plot up very quickly with the gnuplot interface module. This is useful for getting a rough graphical view of some function. Simply...

1. install Gnuplot (through your package manager)
2. cabal install gnuplot
3. use ghci:

Code:
$ ghci
GHCi, version 7.4.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ...
...
Attached Images
File Type: png image3023.png (29.8 KB, 3 views)
Member
Posted in Uncategorized
Views 7302 Comments 0 hydraMax is offline
Old

Dorito Thief Strikes Again!

Posted 12-27-2012 at 11:25 PM by hydraMax (Bits and Pixels)
Tags humor

http://youtu.be/Kqy9hxhUxK0
Member
Posted in Uncategorized
Views 1118 Comments 0 hydraMax is offline
Old

New-Make And MC2, Meet MPG123 (terminal app to play MP3 and other file formats)

Posted 12-25-2012 at 08:11 PM by rainbowsally
Updated 08-06-2014 at 08:47 AM by rainbowsally (wrong acronym for alsa)

After that last rant about screwy software, I found some GREAT software. mpg123 is outstanding.

Today's Features
  • Me eating my words, even about assembler coding. ;-)

Famous last words galore! I even have to eat my words about asm. In fact this app is so cool I had to add the ability to compile asm and C sources in the same directory to the mc2 code.

MPG123 (sandboxed relocatable binary installation OR compile from code, modify, experiment, etc.) is linked...
Member
Posted in Uncategorized
Views 1098 Comments 0 rainbowsally is offline
Old

Hashing for ID generation (hash32_enum algorithm and ASM)

Posted 12-24-2012 at 10:45 AM by rainbowsally

You're not going to get fool-proof uniqueness from a 32 bit hash, but this one gets pretty close.

[cont'd from previous blog entry where the C/C++ version can be seen (and tested). http://www.linuxquestions.org/questi...-lists-35223/]

If you're curious about what the hash32_enum thing in the previous blog entry would look like in assembler, this is the output using the --save-temps gcc flag.

Code:
;
...
Member
Posted in Uncategorized
Views 798 Comments 0 rainbowsally is offline

  



All times are GMT -5. The time now is 11:43 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration