|
Something like this? (source) Takes arbitrary data as input, emits I32HEX without byte swapping, and properly uses ELAR records when handling stuff larger than 64k. As far as I can tell it gets everything right, although I haven't tested it exhaustively. Usage: hexify [from] [to]. If to is omitted, writes to stdout; if both are omitted, reads from stdin and writes to stdout. To make it easy to use on windows, it's wrapped in a simple C program (source) that is statically linked against the lua interpreter. I may expand that into a proper packaging tool at some point. E: also, something I thought of only after I wrote it - is the intended input meant to be binary data, or is it meant to be an existing hex dump that you just want to add the I32HEX decorations to? Because this program does the former. If you wanted the latter that's easy enough to do as well, though. ToxicFrog fucked around with this message at 19:42 on Feb 28, 2011 |
# ¿ Feb 28, 2011 19:35 |
|
|
# ¿ May 21, 2024 06:16 |
|
Ok, this one should actually do the thing. windows binary lua source wrapper source (now upgraded into a full-featured program) Same command line signature as the last one. Known issues: doesn't do any sort of input validation, if you feed it a file containing something other than a hex dump you will see something like this: code:
ToxicFrog fucked around with this message at 19:08 on Mar 1, 2011 |
# ¿ Mar 1, 2011 19:04 |
|
I don't know if there's a way with windows builtins, but if you're comfortable with tail and awk (or sed), there's windows versions of them which can handle this task easily. Something like this quick and dirty script (needs uname, awk, and tail, all of which are in the above package): code:
pre:$ awk -f syslog.awk progname=syslogtest /etc/passwd Apr 05 14:14:51 leela syslogtest: root:x:0:0:root:/root:/bin/bash Apr 05 14:14:51 leela syslogtest: daemon:x:1:1:daemon:/usr/sbin:/bin/sh
|
# ¿ Apr 5, 2011 19:25 |
|
Aleksei Vasiliev posted:How dumb do you have to be to create a Do Not Call list and then let telemarketers download a complete list of every number in it As Achmed points out, this is really the only practical way to do it. At least here in Canada, though, it looks like your number gets broadcast to them at the start of the two-week grace period they get, or something, because the number of telemarketing calls you get goes WAY up during those two weeks.
|
# ¿ Oct 11, 2011 03:55 |
|
SpaceMost posted:I couldn't get the -o parameter to work (maybe because I'm on Windows XP ) so I downloaded a program called Sublime Text and managed to lasso a developer here to help me out -- we managed to get rid of everything besides the GUI_* but now everything is in a huge block that I'll have to format into a list. Still, a lot better than before. Yeesh. Do you mean 'you couldn't get grep -o to work, but grep works fine' or 'you couldn't get grep working at all[/fixed]'? Because if the latter, that's because windows doesn't come with it; you'll need to download a windows version (gnuwin32, MSYS, and Cygwin all have windows versions of grep). If everything is in a huge block you need to format into a list - eg, "GUI_FOO GUI_BAR GUI_BAZ" - can't you just find-replace " " with "\n", either on the command line (sed) or in your editor of choice?
|
# ¿ Nov 22, 2011 22:27 |
|
Something like get-childitem -recurse | foreach-object { rename-item ... } will probably work, but my powershell isn't strong enough to come up with the actual rename arguments.
|
# ¿ Feb 13, 2012 16:44 |
|
Stonefish posted:Okay, I'm assuming complete bastard at this point. The HTML part is a five minute task. The actual program backing it (and associated web server infrastructure it runs on) is the ugly part. As webapps go this is pretty simple, but I still wouldn't classify it as "tiny" on the grounds that any webapp is a colossal pain in the rear end.
|
# ¿ Feb 15, 2012 04:55 |
|
LittleBob posted:(Basically, this company has switched to VoIP, and in the process has lost their fax machines. Whilst I could get them an analogue adaptor so they could still fax, I'd like to avoid that. They can fax by sending attachments to <faxnumber>@nul.com or whatever, so I'd like to automate the process.) Wouldn't it be easier to just send the email directly using an SMTP library rather than invoking Thunderbird to do it?
|
# ¿ Mar 25, 2012 02:16 |
|
peepsalot posted:This is less of a request for an app, and more request for suggestions on what languages/libraries/etc you might use to build a specific kind of app. I wasn't sure where else to ask general programming thing like this. The general programming questions thread is generally a good place for general programming questions. quote:I would like to make a simple GUI based application that does some web scraping. basically load up a couple pages that are on servers which I do not control, and grep the source for some particular textual data that the user can specify. My first thought about this sort of thing is to just go with HTML/javascript, as that is the one sort of GUI thing that makes most sense to me, and Javascript is already geared towards handling HTML docs, but then I cringe once I start thinking about jumping through all these hoops to get around javascript cross domain protection crap. So what would you guys use for something like this? Depending on how robust the HTML handling needs to be, I'd probably use either Lua (with iup for the gui, luasocket for networking, and some simple regexes for scraping) or Python (with tk for the gui and HTMLParser for the parsing). If it got sufficiently complicated I might move to Scala, but that's not one of the languages you listed, and from what you've described here it probably wouldn't get big enough to warrant that anyways.
|
# ¿ Apr 17, 2012 22:15 |
|
.swf (ShockWave Flash) is the Flash file format. Most likely each subject just has a .txt file for the text part and a corresponding .swf for the video in some format Flash can play. See if the .swfs will open in an external flash player. If so, the quick and dirty solution is just to use the ipad's text editor/viewer to read the .txt file, then use its flash player to open the .swf.
|
# ¿ Apr 20, 2012 05:14 |
|
quote:If it's not fullscreen, and this is where it may be tricky (impossible?) is to strip out the toolbars and tabs of Chrome and just have a titlebar, and that's it. You can't navigate elsewhere - it just opens the address that is specified in a config file. WebKit is just the rendering/layout engine; stuff like the address bar and menu bar is added by Chrome (or whatever browser is using WebKit), it's not part of WebKit itself. I think this would be pretty simple to do but I haven't really looked at the WebKit API and I'm not sure how complicated it is to use. I may take a look at it and report back. E: ToxicFrog fucked around with this message at 18:52 on May 15, 2012 |
# ¿ May 15, 2012 17:49 |
|
Hogburto posted:Is making a duplicate file finder a little too large in scope for this thread? What OS?
|
# ¿ Jun 24, 2012 00:25 |
|
Hoborg posted:Enjoy. No worries, I decided to use this as an opportunity to learn Clojure and the .NET build process and got kind of bogged down in working around the fact that (file-seq) follows symlinks. I may finish it anyways just for fun, though. E: decided to prototype it in the JVM first, turns out File.canRead doesn't actually work ToxicFrog fucked around with this message at 05:07 on Jun 25, 2012 |
# ¿ Jun 25, 2012 04:22 |
|
Moey posted:Since I have not done any java programming in the better half of a decade, I figured I would put this out there. ...does it have to be in Java? Also, is it allowed to depend on anything in the repositories, or just stuff that's installed by default? E: also, is there a reason it can't just display the legal notice, then launch one of the existing rdesktop frontends like grdesktop, tsclient, or gnome-rdp? Or are those too complex for the intended audience? E2: also, if this is a multi-user system, sending the password to rdesktop via command line is a security risk; are you sure you don't want to just let rdesktop prompt them for the password automatically? ToxicFrog fucked around with this message at 00:30 on Jun 26, 2012 |
# ¿ Jun 26, 2012 00:06 |
|
Moey posted:Could depend on other things, for the purpose of these builds we already have openJDK installed, I just assumed Java would be the simplest to do this in. In that case here is a dirt simple bash implementation. Download, make executable, double-click. Uses zenity, which should already be installed - if not just "sudo apt-get install zenity". It is (hopefully) obvious where to edit in the window title, rdesktop options, and legal notice you want. Due to limitations in how zenity works this asks the questions one after another, each in their own window; if you need it all in one window I can toss together a python version that does that instead. E: there's also no error checking, eg, it'll happily proceed and let rdesktop complain if "username" is left blank. If you do want to go ahead with this version, I'll add that. ToxicFrog fucked around with this message at 01:05 on Jun 26, 2012 |
# ¿ Jun 26, 2012 01:00 |
|
Moey posted:Awesome! I will do some testing tonight or tomorrow. Thanks. For simple "fill out a form" type stuff, it's generally way faster to do it in a scripting language with builtin bindings to a small gui library. Python/Tkinter and TCL/Tk come to mind; neither is my favorite language, but Tk is nice and simple and both are pretty much standard on linux (python especially). For even simpler question-and-answer things, zenity is fine. It's incapable of anything more complex, but sometimes that's all you need.
|
# ¿ Jun 26, 2012 01:16 |
|
Moey posted:Hmm. To get the text input boxes on the same window, would I have to move to something a little more powerful? Yes. Someone more experienced with Python could probably tighten this up some. ToxicFrog fucked around with this message at 03:36 on Jun 26, 2012 |
# ¿ Jun 26, 2012 03:15 |
|
Moey posted:Sorry to be such a pain, but how do I launch this? That should work fine. What happens when you try running it from the terminal (./rc.py)? I don't have 12.04 handy right now to test on, so my best guess is that either (a) it doesn't come with tkinter by default (easy to fix with apt-get) or (b) it's defaulting to python3 rather than python2 as earlier versions did, which will require some minor changes to the program. ToxicFrog fucked around with this message at 17:58 on Jun 26, 2012 |
# ¿ Jun 26, 2012 17:50 |
|
Moey posted:You rock. ./rc.py showed that it was missing tkinter. apt-get install python-tk fixed that up real good. Somewhere in Nautilus there's an option to change this globally (for all python scripts, or possibly for all scripts of any kind). You probably don't want that, though. What you probably do want is to create a .desktop file, like this: code:
|
# ¿ Jun 26, 2012 19:43 |
|
TysonR posted:I'm hoping this might be a tiny custom app but if it isn't just ignore. Does it have to be C++? Moey posted:You seriously rock! The amount of googling the wrong terms I would have done to figure that out would have been embarrassing. I have all the answers because these are all things I've banged my head against in the past (and spent embarrassing amounts of time figuring out). I hope the app works well for you.
|
# ¿ Jun 26, 2012 21:52 |
|
Scaramouche posted:Couldn't you just do this in shell script (Perl, Bash, .bat, powershell) and something like cURL/ncat? I was going to do it in lua so it could be contained in a single file, but yeah, those would also work just fine. Hence my question about whether it has to be C++.
|
# ¿ Jun 26, 2012 22:18 |
|
Hoborg posted:My homeworksense is tingling. From an end-user perspective, though, there's no difference these days between a CLR app, a native app, and a py2exe/enceladus/etc script + embedded interpreter.
|
# ¿ Jun 26, 2012 22:37 |
|
TysonR posted:I'm requesting C++ because I would like to integrate this functionality into a program that is already written in C++. I think I could do this after playing around with urllib2 in python, but the program that this would be put into is in C++, and googling and asking around about the best way to implement this in C++ is still leaving me with more questions than answers. Hence, I figure if this app can be done in a small amount of time it would be a lot easier for me to understand it from the source code. This is pretty fragile even for DRM, but at least it's easily bypassed, so there's that. If you control the authentication server as well, switching to GET instead of POST will make your life a lot easier on the client side as you can construct an appropriate GET query in just a few lines even without using libcurl or something, whereas POST, in my experience, is a pain in the rear end whether you're using an http library or not.
|
# ¿ Jun 26, 2012 23:08 |
|
Hoborg posted:Uhm, how? I'm genuinely curious. code:
code:
|
# ¿ Jun 27, 2012 00:59 |
|
Jiblet posted:Sorry, should have said - I'm trying to use the extra keys on a Microsoft Natural 4000 keyboard (the "My Favorites" buttons specifically which I don't use at all and don't want to use). The drivers will let me use assign the button to a keypress or to fire off an application. ...since you can already set the media keys to send other keystrokes, why not just have them send the keystrokes that are already bound to "TS3 mute" and "TS3 toggle away"? Why does AHK have to get involved at all?
|
# ¿ Aug 26, 2012 00:18 |
|
pipes! posted:Not so much an app as much as an Alfred extention, but I have this half-baked piece of Bash: I have no idea what you mean by "{query} should be escaped via the spaces". For the rest of it, though - variable assignment in bash is just name=value. The value you want here is the output of the echo|bc, which you can get using $() ($(cmd) runs cmd and expands to the output of that command), something like this: code:
code:
|
# ¿ Nov 21, 2012 18:56 |
|
madeupfred posted:This is a really tiny and kind of stupid, but I would be willing to pay for an app that takes the County Results by state at http://www.politico.com/2012-election/results/president/(Insert State Here)/ and saves them in an Excel workbook. Arranged how? Same way as on the site, with county - candidate - party - %votes - nvotes, and multiple rows per county?
|
# ¿ Dec 14, 2012 00:56 |
|
juche mane posted:After reading about what they did to Oracle, I don't think I'll be giving these Libre Office people a lick of my support. I think I might just wing it, this thing is the size of a hand-ball so I think the weight/volume be damned, I'll just drain it tonight and see how it goes. Ok, I know I'm probably going to regret this, but I'll take the bait: what, in your mind, did the LibreOffice devs do to Oracle, and how is using LibreOffice "supporting" them (given that it's free software that they don't even get ad revenue from)?
|
# ¿ Dec 31, 2012 19:20 |
|
pipes! posted:I was wondering if it's possible to alter my .bash_profile to have the prompt display a special character when I'm in a specific directory or it's child subdirectories. Something that would look like: Totally. You can embed $(...) sequences in your $PS1 and they'll be executed when the prompt is displayed, so you can do something like this: code:
E: here you go: code:
If you want to change the prompt, just change the value of $PS1, but this should match the example you gave. ToxicFrog fucked around with this message at 01:38 on Apr 10, 2013 |
# ¿ Apr 10, 2013 01:29 |
|
Happiness Commando posted:Anyone willing to make a tiny app that will play an mp3 or wav file every X or X + rand(Y) minutes without any intervention? What OS, and is it going to play the same file each time or does it need to go through a list?
|
# ¿ Mar 22, 2014 16:07 |
|
Masked Pumpkin posted:I've got a Windows 2012 server with a bunch of files (400 000+) that need to be transferred to a new server. FTP has been set up, and that whole process has been smooth, except that hidden in those folders are a number of files with a space in the front: " sms.pdf", for example. Are you sure the problem is windows and not whatever software you're using to do the transfer? Win7, at least, is a-ok with filenames that have leading whitespace.
|
# ¿ Jun 11, 2014 17:34 |
|
|
# ¿ May 21, 2024 06:16 |
|
Uncle at Nintendo posted:If someone could please help, it would be greatly appreciated. This with the combo of a baby who is teething is giving me some pretty bad sleep deprivation so any help would be literally improving my quality of life. Here you go. Based on nircmd. Unzip somewhere, double-click raccoons.bat, enter how many minutes you want it to mute for. Press any key to unmute early.
|
# ¿ Feb 28, 2016 16:59 |