- Authoring Ebooks: http://www.authoringebooks.com/
- Create Your Own Programming Language: http://createyourproglang.com/
- Exceptional Ruby: http://exceptionalruby.com/
- JavaScript Performance Rocks: http://javascriptrocks.com/performance/
- Redmine Tips: http://www.redminetips.com/
- The SPDY Book: http://spdybook.com/
- Rails 3 Upgrade Handbook: http://www.railsupgradehandbook.com/
- Refactoring Redmine: http://www.refactoringredmine.com/book/
- Bootstrapping Design: http://bootstrappingdesign.com/
- Recipes With Backbone:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# we're using the TmpIO class | |
# -*- encoding: binary -*- | |
# :stopdoc: | |
require 'tmpdir' | |
# some versions of Ruby had a broken Tempfile which didn't work | |
# well with unlinked files. This one is much shorter, easier | |
# to understand, and slightly faster. | |
class TmpIO < File | |
# creates and returns a new File object. The File is unlinked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
# r, w = IO.pipe | |
# w << 'secret' | |
# w << ' message' | |
# w.close_write | |
# r.read #=> "secret message" | |
# if fork | |
# wr.close |
Data visualization in one of three most important steps in data mining (https://github.com/entaroadun/hnpickup). Often times, it's impossible to understand data without proper visualization. I went looking for great tools to do that.
Two website list recent JS visualization frameworks:
- http://www.splashnology.com/article/15-awesome-free-javascript-charts/325/
- http://sixrevisions.com/javascript/20-fresh-javascript-data-visualization-libraries/
Most of them are available on Github. My three favorite:
The analysis will take 60 seconds (which you can change with the optional - duration switch), after which powercfg will save its report as an HTML file on your desktop. Just double-click output.html to view the report.
powercfg -energy -output %userprofile%\desktop\output.html
Enabling this setting will prevent Windows from paging certain system processes to disk
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
DisablePagingExecutive // Values: 0 = disabled (default), 1 = enabled.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Lisp | |
def initialize | |
@env = { | |
:label => lambda { |(name,val), _| @env[name] = val }, | |
:quote => lambda { |sexpr, _| sexpr[0] }, | |
:car => lambda { |(list), _| list[0] }, | |
:cdr => lambda { |(list), _| list.drop 1 }, | |
:cons => lambda { |(e,cell), _| [e] + cell }, | |
:eq => lambda { |(l,r), _| l == r }, | |
:if => lambda { |(cond, thn, els), ctx| eval(cond, ctx) ? eval(thn, ctx) : eval(els, ctx) }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For vs. each | |
# Results: | |
# | |
# user system total real | |
# 0.340000 0.000000 0.340000 ( 0.341422) | |
# 0.310000 0.000000 0.310000 ( 0.326168) | |
require 'benchmark' | |
n = 500000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'amqp' | |
module HiringThingEM | |
def self.start | |
if defined?(PhusionPassenger) | |
PhusionPassenger.on_event(:starting_worker_process) do |forked| | |
# for passenger, we need to avoid orphaned threads | |
if forked && EM.reactor_running? | |
EM.stop | |
end | |
Thread.new { |
OlderNewer