|
Hmm, this is odd. This computer also runs Win7, which doesn't appear to have any problems with dropped packets or the network in any way, so I'm reasonably confident that it isn't a cable problem. However, ifconfig gives this output: code:
code:
If it is at all relevant, the network chipset is Realtek RTL8111E, and lshw gives the following output: code:
fake edit: Ah, now that I was pointed in the direction of Network Manager, I was lead to this page: http://askubuntu.com/questions/46942/how-do-i-stop-my-ethernet-network-connection-from-dropping. I'll try this out. update: Yep, those instructions fixed. Botched default driver for an incredibly common NIC chipset. I gotta say, Ubuntu has made great strides since I started playing with it in 2006, but it's still these sorts of things which makes it a really frustrating experience. Some things are funny though. I'm migrating from OS X and am attempting to replicate Expose/Spaces/Window Management as closely as possible. Compiz is really cool, the only thing I'm having trouble with is binding keys to "expose" windows in the one application (F10 in OS X, you can kind of get it by Shift-clicking on the Launcher icon for an application) and switching between windows of the same application (Cmd-` in OS X, there is a setting for it in System Settings->Keyboard Shortcuts but it doesn't work). CSSM is a really good, if poorly presented, tool, but hilariously it's the only application I've encountered which stuffs up when using Grid-Maximise. Also, changing the theme can make the text in the title bar invisible as you can't change the colour of the text in it independantly, and the nvidia driver installed through 'Additional Drivers' for a GTX570 does not detect multiple monitors. xPanda fucked around with this message at 02:40 on Jul 5, 2011 |
# ? Jul 5, 2011 02:19 |
|
|
# ? May 17, 2024 18:10 |
|
Can someone explain this regex to me?code:
I found this description of ?? on google: Makes the preceding item optional. Lazy, so the optional item is excluded in the match if possible. This construct is often excluded from documentation because of its limited use. However I still don't get it, can someone break it down for me? I think I'm getting mixed up due to the overloading of . and *, among other things. Thanks! SynVisions fucked around with this message at 20:57 on Jul 5, 2011 |
# ? Jul 5, 2011 20:53 |
|
I'm not really experienced with regexp and such, but '?' works for single characters and it needs to be an actual character to match. So, .??* would match anything that has a dot in the beginning, but also at least two other characters (thus excluding . and .., since they don't have enough characters). I could very well be wrong though.
|
# ? Jul 5, 2011 21:06 |
|
It seems like you're correct, because the regex doesn't pickup files such as: .a So the descriptions I've read of this online are false, it doesn't grab everything except for . and .. . I got confused because it's based upon the preceding character in regex, but this seems to be a different usage. SynVisions fucked around with this message at 21:15 on Jul 5, 2011 |
# ? Jul 5, 2011 21:10 |
|
This seems odd (are you sure it's not '\.??*' ), but... . -> matches any character ?? -> makes it optional (tries not to suck it in) * -> match the preceding pattern zero or more times As opposed to: ? -> makes it optional (greedy -- grabs it as part of the match if it can) So: .??* should match any string you dump in, really, since it'll reduce down to .* in 99% of cases. code:
code:
code:
evol262 fucked around with this message at 21:35 on Jul 5, 2011 |
# ? Jul 5, 2011 21:32 |
|
One of these days I will have to get around to learning regex beyond the most basic functions I know.
|
# ? Jul 5, 2011 21:34 |
|
brc64 posted:One of these days I will have to get around to learning regex beyond the most basic functions I know. The O'Reilly book Mastering Regular Expressions is pretty good. I learned a bit just going through it. Didn't use it for a long while and forgot most of it though. It covers the different flavors of regex, so not just perl.
|
# ? Jul 5, 2011 22:00 |
|
How much memory does an SSH tunnel use (roughly)? I know there are some relatively low-end routers/firewalls that allow you to have 10-25 VPN users so I assume it's similar, and a fairly trivial amount of RAM. I guess I could just fire up a server and watch top or something while I start connecting from random machines.
|
# ? Jul 5, 2011 22:07 |
|
evol262 posted:What language is this? Sorry, I should have been more specific. It's probably not even technically regex. This is at the shell level (bash in this case). ls -ld .??*
|
# ? Jul 5, 2011 22:07 |
|
SynVisions posted:Sorry, I should have been more specific. It's probably not even technically regex. In the shell, it's not a regex, it's a glob. In globs, ? means "any single character" and * means "zero or more characters", so that matches any filename which begins with a dot followed by at least two characters.
|
# ? Jul 5, 2011 22:36 |
|
ShoulderDaemon posted:In the shell, it's not a regex, it's a glob.
|
# ? Jul 5, 2011 23:02 |
|
Bob Morales posted:How much memory does an SSH tunnel use (roughly)? I thought that the limitations on firewall VPN sessions were not due to memory and more due to licensing profit or CPU in low-end hardware. Looks like my VPS uses about 650KB of memory for a non-interactive SSH tunnel and more than 2MB with a full shell.
|
# ? Jul 6, 2011 00:00 |
|
JHVH-1 posted:The O'Reilly book Mastering Regular Expressions is pretty good. I learned a bit just going through it. Didn't use it for a long while and forgot most of it though. It covers the different flavors of regex, so not just perl. Practically every language uses Perl Compatible Regular Expressions (PCRE), including Java and .NET, with minor syntactical differences. @"" in .NET, r'' in Python, and the like for raw strings, matching can be: code:
The holdouts are mostly awk and shell scripting (my personal take being that you're better off using Perl for these cases anyway). BnT posted:I thought that the limitations on firewall VPN sessions were not due to memory and more due to licensing profit or CPU in low-end hardware.
|
# ? Jul 6, 2011 15:05 |
|
Okay, still ripping my DVDs with HandBrakeCLI, but I've got a couple that HandBrake is having difficulty determining the main title on. For whatever reason, this DVD contains 84 titles. Normally I've been using the command: HandBrakeCLI -t 0 -i /media/cdrom ...to figure out for myself which title and chapters to select, but because there are so many, it's scrolling past the buffer in putty so I can't easily review the list to determine which ones I need. I'd like to redirect the output to a text file that I can quickly scroll through, so I tried: HandBrakeCLI -t 0 -i /media/cdrom > dvd.txt ...but all that seems to do is give me a 0 byte file named dvd.txt. I also tried | more instead, but that didn't have any effect either. I figure I must be missing something extremely simple, but I can't for the life of me figure out what it is. Edit: removed DVD title just in case anybody complained brc64 fucked around with this message at 17:11 on Jul 6, 2011 |
# ? Jul 6, 2011 17:03 |
|
It might be printing to stderr instead of stdout - try with &> instead of just > . (I'm assuming this is bash or bash-like.)
|
# ? Jul 6, 2011 17:14 |
|
brc64 posted:Okay, still ripping my DVDs with HandBrakeCLI, but I've got a couple that HandBrake is having difficulty determining the main title on. For whatever reason, this DVD contains 84 titles. Normally I've been using the command: It might be directing output to stderr instead of stdout, so look on how to redirect stderr into less (don't use more, more sucks, use less).
|
# ? Jul 6, 2011 17:14 |
|
Computer viking posted:It might be printing to stderr instead of stdout - try with &> instead of just > . That did exactly what I wanted. Now I suppose for true learning I should look up the difference between stderr and stdout to understand why that worked.
|
# ? Jul 6, 2011 17:31 |
|
Basically, you have one input channel (stdin), but two output channels (stdout and stderr). The idea is that programs can output the actual data on stdout, while status info, warnings, errors and the like go to stderr. Then, you can do "tool > file" or "tool | othertool" and the data goes in the file or into the next program, but the other stuff is printed on the console. Sometimes, programs have weird ideas about what should go where, though.
|
# ? Jul 6, 2011 18:06 |
|
Computer viking posted:Basically, you have one input channel (stdin), but two output channels (stdout and stderr). The idea is that programs can output the actual data on stdout, while status info, warnings, errors and the like go to stderr. Then, you can do "tool > file" or "tool | othertool" and the data goes in the file or into the next program, but the other stuff is printed on the console.
|
# ? Jul 6, 2011 19:13 |
|
brc64 posted:That's pretty much what I read. I'm mostly trying to wrap my head around the functional difference between the two output streams, since both seem to output to the terminal as far as I can tell. Are they only really useful when using a program to differentiate and intercept them? You could re-direct stderr to a log file or something.
|
# ? Jul 6, 2011 19:22 |
|
Bob Morales posted:You could re-direct stderr to a log file or something. Basically, they're both just file handles a program can write to. When the shell starts a process, that process starts with stdout, stderr and stdin set by the shell. If you just run "tool", nothing special, then stdin is the keyboard, and stdout+stderr are both connected to the console output. The different things you can do in the shell can modify this: Using > will connect stdout to the given file. 2> connects stderr. &> connects both. If you do "tool1 | tool2", then stdout (but not stderr) from tool1 is connected to stdin in tool2, and I believe &| will connect both. Put simpler, they aren't inherently different, it's just that they're typically used for different things - and the shell will join them together unless you tell it to separate them somehow. edit: An example might be useful. I've got a python script lying around that will read two large text files, and extract some information from the combination. It writes the results to stdout, and progress info to stderr. In practice, that means I can run "mytool file1 file2 > results", getting both a clean data file and progress/debug information on the console while it slowly churns its way through. I could have swapped stdout and stderr in the program and done "mytool file1 file2 2> results" with the same result, but that's just being different for the sake of it. Computer viking fucked around with this message at 20:30 on Jul 6, 2011 |
# ? Jul 6, 2011 20:22 |
|
brc64 posted:it's scrolling past the buffer in putty so I can't easily review the list to determine which ones I need. I'd like to redirect the output to a text file that I can quickly scroll through, so I tried: code:
I realize the above example doesn't quite work for reasons already discussed, but you may find the general idea to be useful.
|
# ? Jul 6, 2011 21:04 |
|
ExcessBLarg! posted:Another tip: you can also do: But be careful about adding this to scripts and blowing away the exit code!
|
# ? Jul 6, 2011 21:13 |
|
How do I unrar a .rar file with a password from the command line if I know the password?
|
# ? Jul 7, 2011 09:13 |
|
Ziir posted:How do I unrar a .rar file with a password from the command line if I know the password? it SHOULD ask you for the password: code:
|
# ? Jul 7, 2011 09:42 |
|
nitrogen posted:it SHOULD ask you for the password: Can I apply the same password to more than one file so I can just forget about it and come back later?
|
# ? Jul 7, 2011 10:03 |
|
Ziir posted:Can I apply the same password to more than one file so I can just forget about it and come back later? have you tried passing the password on the command line as described in 'man unrar'?
|
# ? Jul 7, 2011 12:03 |
|
I just started using cmus which has been awesome. Right now cmus just plays music through the laptop speakers that I have Arch installed on, but it would be nice if I could stream it over SSH or something. Is there another music player or something I could use to do this? Also, what's the best way to manage music metadata on Linux/Arch? It'd have to be CLI only. covener posted:have you tried passing the password on the command line as described in 'man unrar'? No, I couldn't figure out how to pass the same password through to the next rar file. Doesn't really matter anymore though cause I didn't have too many rar files anyway.
|
# ? Jul 8, 2011 10:27 |
|
Ziir posted:I just started using cmus which has been awesome. Right now cmus just plays music through the laptop speakers that I have Arch installed on, but it would be nice if I could stream it over SSH or something. Is there another music player or something I could use to do this? You'd have to stream the sound over the network and tunnel the port used over SSH. This can be done with VLC I think, which has a CLI version.
|
# ? Jul 8, 2011 11:04 |
|
Ziir posted:cmus Thanks for the tip. Been after something like that for a long time.
|
# ? Jul 8, 2011 11:12 |
|
Does anyone know how to disable the error sound in thundebird? One of my email accounts is making GBS threads itself, and I'm tired of getting the crap scared out of me whenever it refuses to take my password.
|
# ? Jul 8, 2011 16:49 |
|
Ziir posted:I just started using cmus which has been awesome. Right now cmus just plays music through the laptop speakers that I have Arch installed on, but it would be nice if I could stream it over SSH or something. Is there another music player or something I could use to do this? Could you mount the music directory over sshfs?
|
# ? Jul 8, 2011 21:26 |
|
I'm having a problem trying to set my VGA output on my laptop, connected to a 1080p 22" lcd. 1440x900 works fine, but trying "xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync" I get a horizontally squashed picture, leaving large black spaces on either side. The TV's internal resolution display says it's in 1920x1080 mode. edit: just discovered it likes "1600x900_60.00" in software, while the tv firmware reports 1440x900? Rocksteady fucked around with this message at 06:23 on Jul 9, 2011 |
# ? Jul 9, 2011 05:57 |
|
evol262 posted:You'll probably want to actually configure ldap.conf, but does this look like a problem to you? You can get the certificate of just about any TLS/SSL service (i.e. the publicly-accessible part of it, not the private key) using the "openssl s_client" command. This is useful if you need to set a certificate as trusted, but you don't know where to find the certificate. For example, in this case you might use: code:
You'll get a long output, which will include something like this in the middle: code:
Here are some instructions for setting up a certificate as trusted for OpenSSL and all the tools that use the OpenSSL library (including OpenLDAP tools and PHP): http://gagravarr.org/writing/openssl-certs/others.shtml
|
# ? Jul 9, 2011 10:48 |
|
I hosed UP REAL BAD Somewhere along the line, I changed my root user shell to /bin/nologin It's a Debian box, there's no sudo. I can still login as other users. I can't scp or ssh in, and doing 'su -c whatever' or 'su -s /bin/sh' doesn't do anything (like the man page says) Any ideas? It's a remote box otherwise I'd just drive to the office and fix it by hand. How can I modify the /etc/passwd file, or run an editor as the root user?
|
# ? Jul 9, 2011 17:01 |
|
Bob Morales posted:I hosed UP REAL BAD Eh, do you have remote console capabilities, so you can see the entire boot process and what not? If so, try single user mode
|
# ? Jul 9, 2011 17:05 |
|
enotnert posted:Eh, do you have remote console capabilities, so you can see the entire boot process and what not? No, all I can do is ssh in as a regular user.
|
# ? Jul 9, 2011 17:10 |
|
Bob Morales posted:No, all I can do is ssh in as a regular user. If you can neither su, sudo or remote-console, I believe your watercraft has run low on paddles...
|
# ? Jul 9, 2011 17:23 |
|
Bob Morales posted:I hosed UP REAL BAD If it's out of date with regard to the latest security patches, your best bet at this point might be to run a local root exploit from your user account, fix up /etc/password or add /bin/nologin to /etc/shells, then su properly and clean up the mess.
|
# ? Jul 9, 2011 17:27 |
|
|
# ? May 17, 2024 18:10 |
|
ExcessBLarg! posted:What version of Debian and how up-to-date is it? Yea, I started searching for some sort of shellcode. It's pretty up to date, though. debian_version is 6.02 Kernel 2.6.32-5-686 I have gcc and everything so I should be able to find something.
|
# ? Jul 9, 2011 17:36 |