Skip to content

Instantly share code, notes, and snippets.

View vesan's full-sized avatar

Vesa Vänskä vesan

View GitHub Profile

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@vesan
vesan / office_api.rb
Created April 8, 2024 14:45 — forked from NGMarmaduke/office_api.rb
Office 365 API connection example in Ruby
class OfficeAPIError < StandardError; end;
class OfficeAPITimoutError < StandardError
def initialize(msg = "Office API timed out")
super(msg)
end
end
class OfficeAPI
attr_accessor :access_token, :messages_filter, :mail_box, :fetch_from
@vesan
vesan / application_controller.rb
Created November 7, 2023 21:25 — forked from janko/application_controller.rb
Implementing Devise groups in Rodauth
class ApplicationController < ActionController:Base
extend ControllerMacros
end
# Rails production setup via SQLite3 made durable by https://litestream.io/
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine.
#
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails
#
# in production you might want to map /data to somewhere on the host,
# but you don't have to!
#
FROM ruby:3.0.2
@vesan
vesan / useCellRangeSelection.js
Created February 9, 2022 09:43 — forked from gargroh/useCellRangeSelection.js
[React Table v7] [useCellRangeSelection] Excel like cell range selection in react table
import React from 'react';
import {
actions,
makePropGetter,
ensurePluginOrder,
functionalUpdate,
useConsumeHookGetter,
useGetLatest
} from '../../react-table/utils';
@vesan
vesan / Gemfile
Created September 19, 2020 18:52 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
{
"ipcMode": null,
"executionRoleArn": "arn:aws:iam::<aws-account-number>:role/ecsTaskExecutionRole",
"containerDefinitions": [
{
"dnsSearchDomains": [],
"logConfiguration": {
"logDriver": "awslogs",
"secretOptions": [],
"options": {
@vesan
vesan / ruby-ldap-sample.rb
Created November 14, 2019 14:51 — forked from jeffjohnson9046/ruby-ldap-sample.rb
Some VERY basic LDAP interaction in Ruby using Net::LDAP.
#######################################################################################################################
# This Gist is some crib notes/tests/practice/whatever for talking to Active Directory via LDAP. The (surprisingly
# helpful) documentation for Net::LDAP can be found here: http://net-ldap.rubyforge.org/Net/LDAP.html
#######################################################################################################################
require 'rubygems'
require 'net/ldap'
#######################################################################################################################
# HELPER/UTILITY METHOD
@vesan
vesan / factory_doctor.rb
Created August 6, 2017 09:53 — forked from palkan/factory_doctor.rb
FactoryDoc: detect useless data generation in tests
module FactoryGirl
module Doctor
module FloatDuration
refine Float do
def duration
t = self
format("%02d:%02d.%03d", t / 60, t % 60, t.modulo(1) * 1000)
end
end
end
@vesan
vesan / Rails Console Actionmailer test.rb
Last active August 22, 2016 08:49 — forked from tansengming/Rails Console Actionmailer test.rb
Rails Console Actionmailer test
# Copy and paste this to the rails console to test your email settings
class MyMailer < ActionMailer::Base
def test_email
@recipients = "vesa@kiskolabs.com"
@from = "must_be_same_as_smpt_account_login@gmail.com"
@subject = "Test from the Rails Console"
@body = "This is a test email"
end
end