Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jonathan Herman
    @lantech19446
    damn
    Lily Romano
    @Lilyheart
    heh
    Jonathan Herman
    @lantech19446
    I broke giphy in cody's room lol
    Lily Romano
    @Lilyheart
    ha! I'll have to see how they have that set up at some point...
    So much I need to do with @MontBot
    Jonathan Herman
    @lantech19446
    function chooseRandomGif(searchTerm) {
      return new Promise(function(resolve, reject) {
        giphy.search({q: searchTerm, limit:10}, function(err, result) {
          if (err) reject('Error');
    
          if (result.data.length) {
            var image = result.data[randomInt(result.data.length)];
            var imageUrl = image.images.original.url;
            resolve(imageUrl);
          } else {
            chooseRandomGif("Fail");
          }
        });
      });
    }
    there was some issue with it today though, not sure if he's fixed it yet
    Lily Romano
    @Lilyheart
    heh. At some point... xD Will require a brainshift I can't do at the moment. Gah schoolwork.
    Jonathan Herman
    @lantech19446
    yea
    and it doesn't make much sense to me still being horrible at js lol
    Lily Romano
    @Lilyheart
    It look like that is just one piece of it.
    Jonathan Herman
    @lantech19446
    it's possible, that's what he posted today but maybe that's just the broken part
    Lily Romano
    @Lilyheart
    Found the bot's code. Look like it was fixed. codyloyd/odin-bot-js@b5c9434
    Jonathan Herman
    @lantech19446
    awesome
    I'll tell you in one moment
    Lily Romano
    @Lilyheart
    MontBot needs to move to another server or something tho that's always one. /sigh stuff and money
    Jonathan Herman
    @lantech19446
    it's working but the gif I just got for golumpki makes no sense at all
    Lily Romano
    @Lilyheart
    That's hysterical.
    picture
    I dunno either, i wanna figure it out tho
    Jonathan Herman
    @lantech19446
    I did one for narendra modi earlier too, it made more sense than this lol
    Lily Romano
    @Lilyheart
    when I search golumpki on the giphy site there are no results... so maybe it's some sort of default search then? I'd have to check their api
    Lily Romano
    @Lilyheart

    figgured it out.

          if (result.data.length) {
            var image = result.data[randomInt(result.data.length)];
            var imageUrl = image.images.original.url;
            resolve(imageUrl);
          } else {
            resolve(chooseRandomGif('Fail'));
          }

    It's that code. The search result had zero. So the if (result.data.length) resolves to false because result.data.length was zero and zero is falsey. That means it did resolve(chooseRandomGif('Fail')); which does a giphy search on the keyword fail xD

    sneaky cody xD
    Jonathan Herman
    @lantech19446
    ooo ok
    interesting, kind of clever too
    lily you should see the screen scrolling installing atom on ubuntu server lol
    Lily Romano
    @Lilyheart
    xD I bet that's entertaining!
    Jonathan Herman
    @lantech19446
    sometimes it makes me feel like the male version of Garcia lol
    Lily Romano
    @Lilyheart
    I don't get the reference :( I'm either tired or just plain don't know it :O
    Jonathan Herman
    @lantech19446
    garcia is the computer expert on criminal minds who developed her entire system from the ground up on Linux
    Lily Romano
    @Lilyheart
    oooooooh
    Jonathan Herman
    @lantech19446
    and atom no go on ubuntu server
    Lily Romano
    @Lilyheart
    boooooooo
    Jonathan Herman
    @lantech19446
    yea it's missing libXss.so.1 and there's no way to add that library to server
    Lily Romano
    @Lilyheart
    ouch
    Jonathan Herman
    @lantech19446
    yep and no luck with gedit either
    Lily Romano
    @Lilyheart
    wow. any gui editors? or just CLI stuff? vi(m)/nano/etc
    I do home automation scripting in nano but I wouldn't want to do anything major. gui ide's just make things so much easier with shortcuts.
    Jonathan Herman
    @lantech19446
    it used to be that you could run limited graphical stuff but now it looks like I pretty much have to go with vim nano touch something like that my problem is how on earth would I import something like github into one of those
    Lily Romano
    @Lilyheart
    git is commandline first.
    I use git 100% on the commandline. My homeautomation is in a git/github repo and I access it purely command line.
    Jonathan Herman
    @lantech19446
    right but opening a project with an entire file structure like I can do in atom isn't going to work in vim
    Lily Romano
    @Lilyheart
    nope :/ Lots of cd'ing needed
    I alias a lot of the folders I need to switch to frequently.
    Jonathan Herman
    @lantech19446
    I think i'm just better off with a de unfortunately
    Lily Romano
    @Lilyheart
    it's not as annoying as you might think once you get used to it. but it can be a pain.
    Jonathan Herman
    @lantech19446
    i mean git itself seems pretty straight forward but I really like having a graphical editor it's just hard for me to keep stuff like that straight in my head
    Lily Romano
    @Lilyheart
    I agree, gui is a LOT easier.
    Jonathan Herman
    @lantech19446
    yea and one of the reasons I'd love to learn linux servers is to get away from that dependency but there's certain things I just wouldn't use them for