« first day (2252 days earlier)      last day (2702 days later) » 

4:38 AM
Why is it I never seem to accurately predict which questions will get a lot of attention?
31
Q: Server admin sent me their private key. Why?

TobyI'm kind of new to ssh so forgive me if this is a stupid question. I'm supposed to be accessing a server in order to link a company's staging and live servers into our deployment loop. An admin over on their side set up the two instances and then created a user on the server for us to ssh in as....

I was sure that was a throwaway answer that might get one, maybe two votes at most.
 
 
10 hours later…
2:28 PM
@Wildcard HNQ feels a little surreal - it's a wild ride when a Q gets picked up! Nice answer!
 
 
5 hours later…
137
Q: Is a rand from /dev/urandom secure for a login key?

IncognitoLets say I want to create a cookie for a user. Would simply generating a 1024 bit string by using /dev/urandom, and checking if it already exists (looping until I get a unique one) suffice? Should I be generating the key based on something else? Is this prone to an exploit somehow?

the two say pretty much the same things and AFAIK were written independently
both have been cited a lot on SE, by me and others
 
@Gilles That was a really great answer. I don't know the first thing about cryptography but still found it very informative.
 
8:46 PM
@terdon it's amazing how many portability problems you can find with a simple df :-/
 
@derobert Not really. it's amazing how many portability problems you can find with a simple df :-/
:P
 
hah
I'm sure StéphaneChazelas could find at least a dozen more. And provide us a thorough historical discussion of each.
And somehow make all of that interesting.
 
Wouldn't be susprised :)
 
9:24 PM
Looks like vim's getting native package management? shapeshed.com/vim-packages
 
will not start an editor flame war. will not start an editor flame war. will not start an editor flame war. will not start an editor flame war.
 
That's a good mantra.
Just remember there's lots of other posts in the sea.
 
:)
 
I want to spit out 10 random bytes, separated by spaces. Here's what I have so far:
cat /dev/urandom | hexdump -v -e '/1 "%u "' | cut -d " " -f 1-10
but it no works.
is borken
 
@AaronHall It hangs. It probably will work if you wait long enough, but just pass it through head:
cat /dev/urandom | hexdump -v -e '/1 "%u "' | head -c 50  | cut -d " " -f 1-10
 
9:33 PM
that will do it. :)
I didn't realize head had the -c argument
cat /dev/urandom | head -c 10 | hexdump -v -e '/1 "%u "'
 
Yeah, comes in handy for this sort of thing.
@AaronHall Even better.
 
head -c 10 /dev/urandom | hexdump -v -e '/1 "%u "'
removed redundant use of cat
 
 
2 hours later…
11:52 PM
Hi guys, I'm learning how to use bash to write my first script for college, but I'm having trouble with nested statements/loops/functions. I'm trying to write an if statement where if a variable value is true, it breaks/returns out of that if statement, then also breaks out of a containing while loop, that is also part of a function, that I want to end (when the if statement's variable is true).

I've tried return N, break N, and exit (I know know this just ends the script.)

Can anyone shed any knowledge on how this should work please?
 
3
A: Capturing key input from events device and mapping it (toggle TouchPad key is unmapped)

Hosh SadiqAs it turns out the kernel did pick it up, but kept complaining that it's not recognised. For anyone else having this issue, or wants to map a key that's not read by the OS, read on. Open a terminal and run dmesg | grep -A 1 -i setkeycodes. This will give you multiple entries like this: [ 9...

^^^^ upvote plz
my answer is somewhat useful so I won't delete it, but the asker's self-accepted answer is the right answer to this question and should be sorted first
@Jamjar91 ask on the site. Post your actual, complete script.
 
@Giles will do, thank you. :)
 

« first day (2252 days earlier)      last day (2702 days later) »