blog.samshull.com
AJAX Push in iOS, Safari, and Chrome with Server-Sent Events
http://blog.samshull.com/2010/10/ajax-push-in-ios-safari-and-chrome-with.html
I was just thinking the same thing. Thoughts and Ideas on how we can make IT better. Saturday, October 9, 2010. AJAX Push in iOS, Safari, and Chrome with Server-Sent Events. One of the many new APIs of HTML5 is Server-Sent Events. Server-Sent Events are a lot like long-polling. The server, you will need to fall back on an XMLHttpRequest, and the message will be sent on a separate connection. Var source = new EventSource("/path/to/my/event-stream-handler.php"); / or whatever CGI you are using source&#...
paramitech.com
ruby chat | Open Source Development
http://paramitech.com/tag/ruby-chat
Go For Open Source. PubSub Chat Using HTML5 Web Socket and em-websocket. It’s 5 in the morning and i am tired and its a possibility that i may be writing a long post, Last night i asked my self what is it that i have learned in the las t couple of months and out of nothingness i rememberd a VIDEO CHAT APPLICATION. Which my friend Viren and I worked on. I thought it might be useful for some of you. We are looking into other HTML5 Features and we get awesome HTML5 web socket. We have choose EM. When a sock...
readystate4.com
ReadyState4 » nginx
http://readystate4.com/category/nginx
Subscribe to the RSS Feed. Add to your Favorites. Archive for the ‘nginx’ Category. Rate limiting your WordPress login from wannabe hackers. Posted on May 1st, 2013 in nginx. As your blog get’s popular you get a lot of people trying to hack it. Especially if it’s on Amazon Cloud. If you’re running WordPress and not already running Nginx as a reverse proxy, you should. It makes it hella fast and a lot more scalable, especially with Nginx Proxy Cache Integrator. Flag to send a 503 “Service Temporaril...
goncharov.mobi
Ruby EventMachine + Daemons
https://goncharov.mobi/en/posts/14-ruby-eventmachine-daemons
Fast, simple event-processing library for Ruby programs. Mainly used for processing network connections. And in this case we will use it today. And must be asynchronous. And gem 'daemons' should provide a daemonizing of process. Type these commands in console:. Rails new event machine daemon bundle install rails g scaffold Person name phone rake db:migrate. Add this lines to your Gemfile:. Gem 'eventmachine' gem 'daemons'. And run "bundle install". In your config/application.rb. Exception" error e.me...
openkr-textcube.blogspot.com
김영삼: 초간단 XMPP 트위터 봇
http://openkr-textcube.blogspot.com/2010/05/초간단-xmpp-트위터-봇.html
2010년 5월 2일 일요일. 초간단 XMPP 트위터 봇. 간만에 간단한 코딩을 한번 해 보기로 한다. 만들어 볼 것은 아주 아주 간단한 트위터 봇(bot)인데, 제목 그대로 내가 내 메신저에서 트위터로 메시지를 날릴 수 있게 해 주는 메신저 봇이다. 트위터(Twitter). 는 아주 인기있는 마이크로블로깅 서비스인지라 이미 세상에는 너무나도 많은 봇들이 나와서 돌아 다닌다. 게다가 봇을 자동으로 생성해 주는 서비스도 여럿 있다. 그렇지만 간단한 봇 정도야 1분, 아니 10분 안에 만들어 쓸 수도 있지 않을까? 우선 몇 가지 준비를 하자. 메신저 프로토콜은 오픈 프로토콜인 XMPP. 를 사용하기로 하자. 부연하자면, XMPP는 예전에Jabber라 불리던 것으로 현재 구글이 GTalk 서비스에 사용하고 있는 XML 스트림 기반의 근사한 메시징 프로토콜이다. 그럼 루비로 간단한 봇 프로그램을 만들어 보자. 코드는 다음과 같다. Logger = Logger.new(STDOUT). 이 봇은 트위터를 예제로...
rocket-science.ru
Sequentional execution: example of Reactor pattern impl
http://rocket-science.ru/hacking/2013/09/05/sequentional-execution-example-of-reactor-pattern-impl
Perls and Rubys in Words. Sequentional execution: example of Reactor pattern impl. Is an event handling pattern for operating service requests delivered concurrently to a service handler by one or more inputs. All the ready-to-use ruby implementations (like EventMachine. And family,) although are very smart built and quite helpful, hide all the details. I decided to write down a short example of how the task may be accomplished in pure ruby. And reply with a result of the command run. CC BY 3.0. Continio...
jonathan.com
Jonathan « The Twilight Sun
http://jonathan.com/author/jonathan-c
Skip to content ↓. Using retry after a LoadError. On May.12, 2011, under Ruby. Someone in the Ruby IRC channel pastied this code today and complained about how ugly it is:. Begin require 'vlad' rescue LoadError require 'rubygems' begin require 'vlad' rescue LoadError end end. It’s meant to account for differences between Ruby 1.8 and 1.9, where rubygems is automatically loaded. And this code. Begin require 'vlad' rescue LoadError retry if require('rubygems') # raise end. Frankly, this probably isn’...
unedited.cyrusinnovation.com
Cyrus Innovation Unedited Blog: November 2008
http://unedited.cyrusinnovation.com/2008_11_01_archive.html
Cyrus Innovation Unedited Blog. Musings on Agile Development, Extreme Programming and Lean Thinking. Wednesday, November 26, 2008. Leave it to a ruby programmer to name their gem after a JCVD movie! Http:/ blog.smartlogicsolutions.com/2008/11/19/timecop-freeze-time-in-ruby-for-better-testing/. Here is some sample code from the post:. Def test mortgage due in 30 days. John = User.find(1). Timecop.travel(Time.now 30.days) do. Assert john.mortgage payment due? Posted by Ariel Valentin. Ola Bini and Loke.