Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Night-Sky Monitoring Public Release
New on LowEndTalk? Please Register and read our Community Rules.

Night-Sky Monitoring Public Release

NeoonNeoon Member
edited May 2018 in General

Hey,

You can find the stuff here: https://github.com/Ne00n/Night-Sky

Its licensed under: Creative Commons Attribution-NonCommercial-ShareAlike 4.0

https://creativecommons.org/licenses/by-nc-sa/4.0/

You need a basic LAMP stack and Night-Sky will work, no framework or such is needed, it runs on PHP 7.0+ vanilla.

I am sure some people will get triggered by (all) some lines in the code, if you think you have a better solution, provide a merge request.

If you have any questions feel free to ask.

Neoon.

«13

Comments

  • @Falzo is happy now

    Thanked by 1Falzo
  • i almost though i will see a

    but this time was fine

    thank you

  • Thank you for making it public! If someone wants to use with my instance it is hosted on my OVH Server...oh

  • Good man

  • Nice one

  • @ehab said:
    @Falzo is happy now

    YES!!!! really big thanks. going to have a look into it later and will set up a thing with multiple locations and such. anyone looking for a refugee place let me know - if possible I'll get everyone a spot to continue using it.

  •   public static function startsWith($haystack, $needle) {
        // search backwards starting from haystack length characters from the end
        return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;
      }
    

    Well, that's the first time I've ever seen a "startsWith" function implemented.

    Thanked by 1Ganonk
  • @WSS said:

      public static function startsWith($haystack, $needle) {
        // search backwards starting from haystack length characters from the end
        return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;
      }
    

    Well, that's the first time I've ever seen a "startsWith" function implemented.

    I saw it coming

  • @jetchirag said:

    @WSS said:

      public static function startsWith($haystack, $needle) {
        // search backwards starting from haystack length characters from the end
        return $needle === "" || strrpos($haystack, $needle, -strlen($haystack)) !== FALSE;
      }
    

    Well, that's the first time I've ever seen a "startsWith" function implemented.

    I saw it coming

    Well, the function did not exists, so I added it.

    I should rename it to BlyatString().

  • as @raindog308 likes to say:

    empty($needle) || strrpos will probably be slightly faster. Your strlen set seems silly to me, since it's generally not going to search beyond the size of the string given- unless..

    You're not feeding that binary data, are you?

  • MikePTMikePT Moderator, Patron Provider

    Thank you, I am sure the community appreciates it! :)

  • Many thanks I'll find a good use for this <3

  • NeoonNeoon Member
    edited November 2017

    @WSS said:
    as @raindog308 likes to say:

    empty($needle) || strrpos will probably be slightly faster. Your strlen set seems silly to me, since it's generally not going to search beyond the size of the string given- unless..

    You're not feeding that binary data, are you?

    Seems like you took my StackOverflow Joke as a Joke.

    However according to Benchmarks, strncmp is faster then strrpos:

    https://stackoverflow.com/questions/834303/startswith-and-endswith-functions-in-php

    I will take care of that.

  • @Neoon said:
    Seems like you took my StackOverflow Joke as a Joke.

    Well, yeah.

    However according to Benchmarks, strncmp is faster then strrpos:

    https://stackoverflow.com/questions/834303/startswith-and-endswith-functions-in-php

    You know what was even fasterbetter? A real (not perl) regex.

    ^.$string.+$

    There's startsWith.

  • @WSS said:

    @Neoon said:
    Seems like you took my StackOverflow Joke as a Joke.

    Well, yeah.

    However according to Benchmarks, strncmp is faster then strrpos:

    https://stackoverflow.com/questions/834303/startswith-and-endswith-functions-in-php

    You know what was even fasterbetter? A real (not perl) regex.

    ^.$string.+$

    There's startsWith.

    Do you just think its better or do you got arguments, like speed?

  • @Neoon said:
    Do you just think its better or do you got arguments, like speed?

    It's standardized, parseable, and simple to learn/live with. strncmp is probably faster than the deprecated ereg(), and is certainly faster than preg functions, but it's rebuilding libc all over again.

  • @WSS said:

    @Neoon said:
    Do you just think its better or do you got arguments, like speed?

    It's standardized, parseable, and simple to learn/live with. strncmp is probably faster than the deprecated ereg(), and is certainly faster than preg functions, but it's rebuilding libc all over again.

    Well kinda, since we are already using RegEx for input validation we may also use it for this method, also it seems to be faster then the current method.

    Feel free to submit a merge request, I take a look, when I have time.

  • If I start to submit patches to PHP based products, then @raindog308's assertion will come true!

    Thanked by 1mikho
  • Which provider would you guys recommend to host an instance for this? No AWS pls.

  • @Falzo PM me about this :P Would love to to be able to monitor through your Night Sky setup :)

  • @Ympker said:
    @Falzo PM me about this :P Would love to to be able to monitor through your Night Sky setup :)

    I'll do, have it set up partially, ran into some problems, now just trying to figure a few more details to get it working properly...

    Thanked by 1Ympker
  • @Falzo said:

    @Ympker said:
    @Falzo PM me about this :P Would love to to be able to monitor through your Night Sky setup :)

    I'll do, have it set up partially, ran into some problems, now just trying to figure a few more details to get it working properly...

    Ask if you need help.

  • @Neoon said:
    Ask if you need help.

    I woke up this morning and there was a rather vile smelling green discharge on the sheets nearby..

  • @WSS said:

    @Neoon said:
    Ask if you need help.

    I woke up this morning and there was a rather vile smelling green discharge on the sheets nearby..

  • it glows in the dark. halp neon

  • NeoonNeoon Member
    edited November 2017

    @WSS said:
    it glows in the dark. halp neon

    Go visit a doctor, SIR.

    Sounds like your inner core melted.

  • @Neoon said:

    Wanna hear the most annoying sound in the world?

    Plays Gaga

    Thanked by 1MasonR
  • @WSS said:

    @Neoon said:

    Wanna hear the most annoying sound in the world?

    Plays Gaga

    SIR, this Thread is about Night-Sky. So no.

  • Night-Sky is dead.

  • NeoonNeoon Member
    edited November 2017

    @WSS said:
    Night-Sky is dead.

    Its getting a second life man.

Sign In or Register to comment.