https://twitter.com/ryanflorence/status/1751996988525064343
How/Why did TypeScript beat Flow?
I never tried flow and was kinda bullied into TS late, so I wasn’t around to experience how it happened.
9:23 PM · Jan 29, 2024
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
require(File.join(File.dirname(__FILE__), 'config', 'boot')) | |
require 'rake' | |
require 'rake/testtask' | |
require 'rake/rdoctask' | |
require 'tasks/rails' |
https://twitter.com/ryanflorence/status/1751996988525064343
How/Why did TypeScript beat Flow?
I never tried flow and was kinda bullied into TS late, so I wasn’t around to experience how it happened.
9:23 PM · Jan 29, 2024
#!/usr/bin/env ruby | |
# NOTE: does not make sense to measure for large iterations, only as | |
# much as the logging being done on rails request, it is not as if on | |
# on a request 10K logging is done. With 50 logging statements i would | |
# prefer syslog | |
# NOTE: Also in buffered and syslog the | |
# log can get lost but logger is more reliable | |
# TODO: measure IO perf, if syslog logs on remote the io cost will be |
# DOCKER-VERSION 0.4.8 | |
FROM ubuntu:12.04 | |
# install essentials | |
RUN apt-get install -y -q git | |
# Install rbenv | |
RUN git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
RUN echo '# rbenv setup' > /etc/profile.d/rbenv.sh |
require 'pp' | |
Dir["#{RAILS_ROOT}/app/models/*.rb"].each { |model_path| require model_path } | |
models = Module.constants.select do |constant_name| | |
begin | |
constant = eval constant_name.to_s | |
next if constant.nil? | |
match = (constant < ActiveRecord::Base) rescue nil | |
if match |
The SICP page recommends MIT scheme,
so that is what we will use
to install it, on Apple OSX using Homebrew:
brew tap x11
brew cask install xquartz
#!/bin/sh | |
# wget-list: manage the list of downloaded files | |
# invoke wget-list without arguments | |
# http://www.linux.com/feature/59457 | |
# http://ubuntuforums.org/showthread.php?t=672074 | |
# http://www.lifehack.org/articles/lifehack/make-your-idle-computer-work-for-you.html | |
# http://decafbad.net/projects/scripts | |
# http://www.google.co.in/search?q=wget+queue&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a |
# DOCKER-VERSION 0.4.8 | |
# am facing issue | |
# https://github.com/dotcloud/docker/issues/1123 | |
FROM ubuntu:12.04 | |
MAINTAINER Deepak Kannan "deepak@codemancers.com" | |
RUN apt-get -y install python-software-properties |
T0 = Thread.main | |
t1 = Thread.new(Thread.current) { |x| Thread.current[:parent] = x; sleep 1_00_000; } | |
t2 = Thread.new(Thread.current) { |x| Thread.current[:parent] = x; sleep 1_00_000; } | |
(t1[:parent] == t2[:parent]) && (t1[:parent] == T0) | |
__END__ | |
# to find out the parent of a thread, ie. was spawned by which thread |
# let us say you want to check if a host is reachable | |
# sometimes you need to be behind a private VPN or the host is just down | |
# and you want to do this on your local-machine and on Heroku | |
# can open your terminal and use ping on your local | |
# And can get a bash shell on Heroku as well - by `heroku run bash` | |
# but there is no `ping` binary there | |
# ```bash |