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
@vesan
vesan / useQuery.js
Created May 6, 2020 11:57
Sync URL with state using react-router
// Usage: const [filters, setFilters] = useQuery(useState({}));
import { useHistory, useLocation } from "react-router-dom";
export default function useQuery([defaultQuery, setValue], method = "push") {
const history = useHistory();
const { search, pathname, hash } = useLocation();
const hasParams = search.indexOf("=") > -1;
const setValueWithQuery = (newQuery) => {
setValue((state) => {
{
"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
// Synchronous
use std::{
collections::HashMap,
error::Error,
fs::File,
io::{prelude::*, BufReader},
};
fn main() -> Result<(), Box<dyn Error>> {
let file = BufReader::new(File::open("top100.txt")?);