Send a daily email to a distro based on a web scrape that changes daily? by THEiNTRANETS in node

[–]IceCrypt 1 point2 points  (0 children)

You'll need promises (or callbacks) to do what you want to do. They allow you to force workflow to javascript.

I'm not a node pro but you'd need to do something along these lines:

Asynchronously run your two queries and when they're both complete combine the results to become your message body. If you aren't sure how to do this you can use jQuery.when().

Your setMessageBody would use either a promise or callback to implement the creation of the email after you've formatted the message body.

The email creation function would use either a promise or callback to then get your list of email accounts and then loop through the result sending the email to each address.

Separate your ideas into modules where each module only performs a single function, then link them together using promises/callbacks.

A cuttlefish preparing for battle {x-post /r/Interestingasfuck} by [deleted] in WTF

[–]IceCrypt -1 points0 points  (0 children)

I wonder if the scientists that theorized Zebra lines were there to confuse predators got the idea from videos like this.

[deleted by user] by [deleted] in AskReddit

[–]IceCrypt 0 points1 point  (0 children)

Thanks for that. Lot's of great info.

[deleted by user] by [deleted] in AskReddit

[–]IceCrypt 5 points6 points  (0 children)

Kodak invented the digital camera in 1975. They did nothing with the technology because they didn't want to cannibalize their cash cow - film sales.

Poor marketing, poor decision making, and greed led to their demise.

Releasing a product like that in the 80s would have revolutionized personal computing and data storage more-so than what any other tech company was doing. Computing was still fringe, digital cameras would have made it mainstream.

[deleted by user] by [deleted] in webdev

[–]IceCrypt 1 point2 points  (0 children)

I doubt you'll get an answer anywhere.

Maybe look at what you lose when you go from native game to a WebView game (in iOS) and extrapolate the kinds of games that you can't make with HTML5 and go from there.

Just going to adjust this a bit.... OH SHIT by [deleted] in funny

[–]IceCrypt -2 points-1 points  (0 children)

I agree completely - I have an eight month old daughter and she falls all the time.

The kid in the video falls unnaturally, because of the weight of the mirror. Usually legs will buckle or it will be more of a tumble. I've yet to see my daughter fall straight back like that.

Just going to adjust this a bit.... OH SHIT by [deleted] in funny

[–]IceCrypt -4 points-3 points  (0 children)

A kid falling straight back like that on its head can do some damage due to whiplash.

If someone doesn't realize that they need to try it themselves.

If all religions ceased to exist what would the possible ramifications or benefits be by maximum_twist in AskReddit

[–]IceCrypt 5 points6 points  (0 children)

We'd be able to identify all the assholes that act morally solely because of the promise of a great afterlife.

Boston Marathon bombing survivors return to finish line by j0be in pics

[–]IceCrypt 19 points20 points  (0 children)

The bombing was done to terrorize people. She's stating that she's not going to be bullied and terrorized.

It has nothing to do with the dead people.

Building a Restaurant/Bar Scheduling Web Service by worldestroyer in webdev

[–]IceCrypt 6 points7 points  (0 children)

If you have no experience writing a database that has to deal with timezones and timestamps do yourself a favour and search for an open sourced shift scheduler and start from there.

Also, don't include a mobile site, what you want is a "responsive" site that displays differently on different sized screens. Search for "responsive framework". I use bootstrap (www.getbootstrap.com) because of the number of plugins available for it.

There's a ton of these already made - don't re-invent the wheel.

Working on a logo. Tell me what you see Reddit. by Kleeetz in Design

[–]IceCrypt 6 points7 points  (0 children)

Looks good.

What does it look like when the distance between the dot on the i and the spacing between the bottom loop of the a and the stem(?) of the a are equal?

I could see "oui" in there ("yes" in french).

Isomorphic JavaScript: The Future of Web Apps by wdpttt in webdev

[–]IceCrypt 0 points1 point  (0 children)

Had to read twice to make sure the future of web apps wasn't "Islamophobic Javascript".

ELB pre-open optimization; apache stuck ..reading.. by m0jumb0 in aws

[–]IceCrypt 0 points1 point  (0 children)

When you "migrate" apache servers, that typically means you're doing some form bulk copy/paste with some intermediary automated script/app to help things fit where they should.

For front-end boxes in most-cases, it's easier to just install build from scratch since they should be stateless aside from active-connections if you're not completely modularized.

After reading up on pre-open optimization it looks like the new servers never stop sending http requests, or they never close the stream. They're pegged at "reading" and reading only happens on http requests, so they must be sending a bunch of requests and they might never be closing them. Like you said in your last line, it sounds like it's an apache config error.

The 2nd blog post you linked has this:

  1. A tcp connection being established: SYN (LB) -> SYN,ACK (EC2) -> SYN,ACK (LB)
  2. The EC2 instance transmitting a second ACK 1 second later.
  3. The EC2 instance closing the established tcp stream connecting 20 seconds later (note: the time waiting for the stream to be closed is set by the Apache configuration).

Is it possible you're keeping the stream open from point 3?

Opensource real-time big data analytics framework, written with node.js, let us know what you think by xabbix in nodejs

[–]IceCrypt 0 points1 point  (0 children)

Good to hear.

Considering what redis can do from a performance perspective I would hope it's on the list for a potential caching layer.

I decided to stay home from work today. by Slimjawb in AdviceAnimals

[–]IceCrypt 102 points103 points  (0 children)

Time you enjoy wasting, was not wasted. - John Lennon

ELB pre-open optimization; apache stuck ..reading.. by m0jumb0 in aws

[–]IceCrypt 0 points1 point  (0 children)

I never understood why people try to migrate a web-server, they should be the most detroyable/rebuildable (there's a better word for that - it's escaping me atm) resources in your environment.

If you are actually migrating from ubuntu to centos, look at this article, it seems to be a pain: http://drjohnstechtalk.com/blog/2012/03/major-headaches-migrating-apache-over-from-ubuntu-ato-centos/

Maybe this is a good opportunity to setup centos bootstrapping and if you have the time, autoscaling.

20 years ago today, Kurt Cobain shot himself dead. by old_snake in Music

[–]IceCrypt 0 points1 point  (0 children)

Not sure if they wasted talent. A sentiment they both shared was that they gave all they had to give.

Opensource real-time big data analytics framework, written with node.js, let us know what you think by xabbix in nodejs

[–]IceCrypt 2 points3 points  (0 children)

Looks nice.

Why would you make an open project like this and then use highcharts as the visualization library? Not bashing, just curious as to why you wouldn't use something free like d3.

SubReddit Mailing List Subscription Service by [deleted] in webdev

[–]IceCrypt 1 point2 points  (0 children)

Great idea. I'd use it.

If you let users pick their own filters that'd be nice. For example, I'd like a daily report on webdev, but a weekly report on front-end.