As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/

[Programming] Mirror, mirror, on the wall, show the git diff for them all

19091939596100

Posts

  • bowenbowen How you doin'? Registered User regular
    I have no idea what's even happening!

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • schussschuss Registered User regular
    Ghoti wrote: »
    Business Objects

    Found the problem.

  • zeenyzeeny Registered User regular
    Man, I honestly can't tell if you're condescending or not.

    I wasn't, apologies if I offended. I thought you are making a joke.

  • Bendery It Like BeckhamBendery It Like Beckham Hopeless Registered User regular
    zeeny wrote: »
    Man, I honestly can't tell if you're condescending or not.

    I wasn't, apologies if I offended. I thought you are making a joke.

    It's cool, I get touchy when I express interest and enthusiasm about things and people think it's a joke.

  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    And Google just announced an English natural language parser named.... Parsey McParseface. Good job Internet

  • djmitchelladjmitchella Registered User regular
    This is pretty great:

    (read the whole thread for context, the tweet on its own doesn't make much sense)

  • Folken FanelFolken Fanel anime af When's KoFRegistered User regular
    Hello programming thread. I'm a big dummy with a big dummy question that I would be most grateful to get any help at all.

    Decided to sign up for a free 1-year trial with AWS because I'm realizing that experience with this will be helpful for my career (statistician/data scientist).

    I've created an ubuntu instance and downloaded a .pem file to connect via ssh (currently using a mac OS X 10.11.4 to connect). For some reason it keeps asking for a passphrase and I have no idea what that could be. Googling has recommended chmod 400 and chmod 600 on the .pem but that hasn't helped.

    So I ask with all the humility in the world... help?

    Twitter: Folken_fgc Steam: folken_ XBL: flashg03 PSN: folken_PA SFV: folken_
    Dyvim Tvar wrote: »
    Characters I hate:

    Everybody @Folken Fanel plays as.
  • bowenbowen How you doin'? Registered User regular
    Hello programming thread. I'm a big dummy with a big dummy question that I would be most grateful to get any help at all.

    Decided to sign up for a free 1-year trial with AWS because I'm realizing that experience with this will be helpful for my career (statistician/data scientist).

    I've created an ubuntu instance and downloaded a .pem file to connect via ssh (currently using a mac OS X 10.11.4 to connect). For some reason it keeps asking for a passphrase and I have no idea what that could be. Googling has recommended chmod 400 and chmod 600 on the .pem but that hasn't helped.

    So I ask with all the humility in the world... help?

    That's odd. Usually that's all you need to log in. Did you set a password anywhere? Maybe try your AWS password?

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Folken FanelFolken Fanel anime af When's KoFRegistered User regular
    Yeah tried aws password, but no luck.

    Twitter: Folken_fgc Steam: folken_ XBL: flashg03 PSN: folken_PA SFV: folken_
    Dyvim Tvar wrote: »
    Characters I hate:

    Everybody @Folken Fanel plays as.
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Ask Amazon support I guess

  • EndEnd Registered User regular
    how are you using the pem file to connect?

    OS X uses the openssh client, doesn't it? ...and openssh doesn't use pem for its keys

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpg
  • Folken FanelFolken Fanel anime af When's KoFRegistered User regular
    End wrote: »
    how are you using the pem file to connect?

    OS X uses the openssh client, doesn't it? ...and openssh doesn't use pem for its keys

    I created a folder in my Documents folder, navigated to it in the terminal, used chmod 400 to make it non public as amazon suggests. Then typed this in the terminal:
    ssh -i "FirstKeyPair.pem" ubuntu@ec2-<My Public IP>.us-west-2.compute.amazonaws.com
    

    Also tried without quotes around the .pem file.

    Here's the output when I add "-v" to the ssh call:
    OpenSSH_6.9p1, LibreSSL 2.1.8
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 21: Applying options for *
    debug1: Connecting to ec2-<My Public IP>.us-west-2.compute.amazonaws.com [<My Public IP>] port 22.
    debug1: Connection established.
    debug1: key_load_public: No such file or directory
    debug1: identity file FirstKeyPair.pem type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file FirstKeyPair.pem-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.9
    debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.4
    debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.4 pat OpenSSH_6.6.1* compat 0x04000000
    debug1: Authenticating to ec2-<My Public IP>.us-west-2.compute.amazonaws.com:22 as 'ubuntu'
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none
    debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug1: Server host key: ecdsa-sha2-nistp256 SHA256:+MIL8/Zf301kTAu2fSXCNhYxIpByuOnYCzBFD2wQlmE
    debug1: Host 'ec2-<My Public IP>.us-west-2.compute.amazonaws.com' is known and matches the ECDSA host key.
    debug1: Found key in /Users/<myname>/.ssh/known_hosts:2
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey
    debug1: Next authentication method: publickey
    debug1: Trying private key: FirstKeyPair.pem
    Saving password to keychain failed
    debug1: key_load_private: incorrect passphrase supplied to decrypt private key
    Saving password to keychain failed
    debug1: key_load_private: incorrect passphrase supplied to decrypt private key
    Saving password to keychain failed
    debug1: key_load_private: incorrect passphrase supplied to decrypt private key
    debug1: No more authentication methods to try.
    Permission denied (publickey).
    

    Twitter: Folken_fgc Steam: folken_ XBL: flashg03 PSN: folken_PA SFV: folken_
    Dyvim Tvar wrote: »
    Characters I hate:

    Everybody @Folken Fanel plays as.
  • InfidelInfidel Heretic Registered User regular
    @Folken Fanel

    You're using Mac OSX, which has different newlines than Windows/Linux. I suspect that while saving your .pem file it did/didn't translate the newlines correctly.

    If your .pem file is "corrupted" and not recognized, it assumes that it must be encrypted and will ask for a passphrase to attempt to sort it out.

    Check what newlines you have on your file, and fix them up to a different type. Try downloading the file from Amazon as Text and as Binary to see if either works, etc.

    OrokosPA.png
  • EndEnd Registered User regular
    well, great, I was wrong about one thing, openssh does use pem for the private keys (but not for the public keys, which is the only one I ever actually look at)

    I'm skeptical it's a newline problem (my version of ssh doesn't care) but I don't have any better ideas, either.

    I wish that someway, somehow, that I could save every one of us
    zaleiria-by-lexxy-sig.jpg
  • CokebotleCokebotle 穴掘りの 電車内Registered User regular
    Hi all, I've got another Java question for you guys.

    In my next assignment, I have to create a TaskScheduler using heap-based priority queues with multiple 'cores'. I'm approaching the problem by creating an ArrayList<ArrayList<Task>> taskList variable to store my sorted tasks, where Task is a class I wrote to hold information. That way if I have 4 cores, then I would have an ArrayList of 4 ArrayLists that store Task objects. Each Task object has its name, release time (time when it's ready to start) and a deadline. Each task takes one unit of time.

    Problem: I'm having access issues for an ArrayList and I'm trying to figure out the best way to handle it. For example, let's say I have a 'task' with release time 1 and deadline 2. My first 'core' is full, so I want to add it to the next one, which I haven't created yet. So I call taskList.add(new ArrayList<Task>()) and then try to add my new task, however I can't directly call taskList.get(0).add(1,<Task>).

    I know that I can just create an empty Task object to fill this new ArrayList, but is there a better way of doing this?

    工事中
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    If you are doing a scheduler with a fixed number of scheduling units (cores) then it makes sense to construct everything at startup, so you would construct your arraylist of arraylists and fill it with the core's arraylist

  • Folken FanelFolken Fanel anime af When's KoFRegistered User regular
    Infidel wrote: »
    @Folken Fanel

    You're using Mac OSX, which has different newlines than Windows/Linux. I suspect that while saving your .pem file it did/didn't translate the newlines correctly.

    If your .pem file is "corrupted" and not recognized, it assumes that it must be encrypted and will ask for a passphrase to attempt to sort it out.

    Check what newlines you have on your file, and fix them up to a different type. Try downloading the file from Amazon as Text and as Binary to see if either works, etc.

    What should I be looking for? I don't see any "\n" anywhere.

    Amazon won't let me download it again.

    Should I be keeping the .pem in whatever folder I want or throw it into /Users/<myname>/.ssh ?

    Twitter: Folken_fgc Steam: folken_ XBL: flashg03 PSN: folken_PA SFV: folken_
    Dyvim Tvar wrote: »
    Characters I hate:

    Everybody @Folken Fanel plays as.
  • CokebotleCokebotle 穴掘りの 電車内Registered User regular
    Good point! I'm just trying to be more efficient with space wherever possible.

    The thing is that each core may or may not actually have a task assigned to them. It's entirely possible for an entire core to be completely empty by the time I finish scheduling tasks. That's why I'm looking at just filling a 'core' up with empty Tasks until I can actually insert a new one.

    I suppose I could just pre-allocate empty Task objects to each 'core' and then overwrite as needed. That would also simplify some of my logic, and since adding elements to an ArrayList is O(1) I shouldn't have issues keeping below O(n log n) overall.

    Thanks!

    工事中
  • InfidelInfidel Heretic Registered User regular
    Infidel wrote: »
    @Folken Fanel

    You're using Mac OSX, which has different newlines than Windows/Linux. I suspect that while saving your .pem file it did/didn't translate the newlines correctly.

    If your .pem file is "corrupted" and not recognized, it assumes that it must be encrypted and will ask for a passphrase to attempt to sort it out.

    Check what newlines you have on your file, and fix them up to a different type. Try downloading the file from Amazon as Text and as Binary to see if either works, etc.

    What should I be looking for? I don't see any "\n" anywhere.

    Amazon won't let me download it again.

    Should I be keeping the .pem in whatever folder I want or throw it into /Users/<myname>/.ssh ?

    Shouldn't matter where you keep it but make sure you're the owner of the file (chown) from whatever account you're trying to connect from.

    What do you get if you "openssl verify FirstKeyPair.pem" ?

    OrokosPA.png
  • Folken FanelFolken Fanel anime af When's KoFRegistered User regular
    unable to load certificate
    14564:error:0906D06C:PEM routines:PEM_read_bio:no start line:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.40.2/src/crypto/pem/pem_lib.c:648:Expecting: TRUSTED CERTIFICATE
    

    Twitter: Folken_fgc Steam: folken_ XBL: flashg03 PSN: folken_PA SFV: folken_
    Dyvim Tvar wrote: »
    Characters I hate:

    Everybody @Folken Fanel plays as.
  • InfidelInfidel Heretic Registered User regular
    edited May 2016
    What is the first line of your .pem if you edit it as text?

    Do you see something like "- - - - -BEGIN __________- - - - -"?

    Infidel on
    OrokosPA.png
  • Folken FanelFolken Fanel anime af When's KoFRegistered User regular
    Infidel wrote: »
    What is the first line of your .pem if you edit it as text?

    Do you see something like "- - - - -BEGIN __________- - - - -"?
    -----BEGIN RSA PRIVATE KEY-----
    22 lines of characters
    -----END RSA PRIVATE KEY-----
    

    Twitter: Folken_fgc Steam: folken_ XBL: flashg03 PSN: folken_PA SFV: folken_
    Dyvim Tvar wrote: »
    Characters I hate:

    Everybody @Folken Fanel plays as.
  • InfidelInfidel Heretic Registered User regular
    Infidel wrote: »
    What is the first line of your .pem if you edit it as text?

    Do you see something like "- - - - -BEGIN __________- - - - -"?
    -----BEGIN RSA PRIVATE KEY-----
    22 lines of characters
    -----END RSA PRIVATE KEY-----
    

    Try this and see if it likes it better?
    tr -d '\r'  < input.pem > output.pem
    

    OrokosPA.png
  • Folken FanelFolken Fanel anime af When's KoFRegistered User regular
    edited May 2016
    Infidel wrote: »
    Infidel wrote: »
    What is the first line of your .pem if you edit it as text?

    Do you see something like "- - - - -BEGIN __________- - - - -"?
    -----BEGIN RSA PRIVATE KEY-----
    22 lines of characters
    -----END RSA PRIVATE KEY-----
    

    Try this and see if it likes it better?
    tr -d '\r'  < input.pem > output.pem
    

    There are no instances of '\r' in the file. When I tried your code the start of output.pem file looks like
    {\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf460
    {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
    {\colortbl;\red255\green255\blue255;}
    \margl1440\margr1440\vieww10800\viewh8400\viewkind0
    \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
    
    \f0\fs24 \cf0 -----BEGIN RSA PRIVATE KEY-----\
    

    Folken Fanel on
    Twitter: Folken_fgc Steam: folken_ XBL: flashg03 PSN: folken_PA SFV: folken_
    Dyvim Tvar wrote: »
    Characters I hate:

    Everybody @Folken Fanel plays as.
  • InfidelInfidel Heretic Registered User regular
    Hahaha, RTF?

    Your pem isn't saved as plaintext somehow?

    OrokosPA.png
  • InfidelInfidel Heretic Registered User regular
    If you're opening it in TextEdit, it does a shit job of handling plaintext without mucking you up sometimes. Which text editor are you using?

    OrokosPA.png
  • Folken FanelFolken Fanel anime af When's KoFRegistered User regular
    edited May 2016
    Infidel wrote: »
    Hahaha, RTF?

    Your pem isn't saved as plaintext somehow?

    I... I don't know.

    Original file is FirstKeyPair.pem

    When I open it there's no preamble before ----Begin RSA private key----

    I typed
    tr -d '\r'  < FirstKeyPair.pem > output.pem
    

    Then opened output.pem in TextWrangler. When I open FirstKeyPair.pem in TextWrangler I don't see the preamble.

    Edit: Wait, I do

    Help.

    Folken Fanel on
    Twitter: Folken_fgc Steam: folken_ XBL: flashg03 PSN: folken_PA SFV: folken_
    Dyvim Tvar wrote: »
    Characters I hate:

    Everybody @Folken Fanel plays as.
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    RTF.... That is a name I've not heard in a long time

  • InfidelInfidel Heretic Registered User regular
    Use a real text editor, or Text Edit in plaintext mode, and copy paste what you see in the original.

    There is formatting code that you don't see, you need to drop it.

    OrokosPA.png
  • Folken FanelFolken Fanel anime af When's KoFRegistered User regular
    So some additional info... when I downloaded the file from amazon, it automatically opened in TextEdit as FirstKeyPair.pem.txt. Then I just changed the extension to FirstKeyPair.pem

    Twitter: Folken_fgc Steam: folken_ XBL: flashg03 PSN: folken_PA SFV: folken_
    Dyvim Tvar wrote: »
    Characters I hate:

    Everybody @Folken Fanel plays as.
  • InfidelInfidel Heretic Registered User regular
    Like, open the file in something that recognizes RTF, like TextEdit if that shows normal, and copy it. Then paste into TextWrangler.

    OrokosPA.png
  • InfidelInfidel Heretic Registered User regular
    I'm guessing there was a copy/paste from the key from a website into something like TextEdit? That keeps the formatting as RTF.

    OrokosPA.png
  • Folken FanelFolken Fanel anime af When's KoFRegistered User regular
    OMG IT WORKED

    Fucking fuck, what the hell OS X.

    Thank you pa thread pals.

    Twitter: Folken_fgc Steam: folken_ XBL: flashg03 PSN: folken_PA SFV: folken_
    Dyvim Tvar wrote: »
    Characters I hate:

    Everybody @Folken Fanel plays as.
  • EchoEcho ski-bap ba-dapModerator mod
    TextEdit: not actually a text editor

  • InfidelInfidel Heretic Registered User regular
    I learned that the same way I think.

    Open plain text file with TextEdit, save as?

    Not plain text!

    OrokosPA.png
  • Folken FanelFolken Fanel anime af When's KoFRegistered User regular
    Now to the wonderful world of cloud-based computing and "big data."

    Time to measure how good my shit works when data is huge.

    Twitter: Folken_fgc Steam: folken_ XBL: flashg03 PSN: folken_PA SFV: folken_
    Dyvim Tvar wrote: »
    Characters I hate:

    Everybody @Folken Fanel plays as.
  • SpawnbrokerSpawnbroker Registered User regular
    Steam: Spawnbroker
  • bowenbowen How you doin'? Registered User regular

    Nice.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    They need to hurry up with the RTM. A lot of libraries we rely on aren't going to release CoreCLR versions until the RTM hits, so we're in this odd holding pattern.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • urahonkyurahonky Registered User regular
    With Javascript/Django, what's a good way to gather client information? We're working on getting two factor authorization but I'm not quite sure how to determine the difference between clients. I've been logging the IP, but if two devices are used in the same building they'd have the same IP so that can't work.

This discussion has been closed.