Skip to content

Instantly share code, notes, and snippets.

View stevengonsalvez's full-sized avatar
💭
trying to be monkish

Steven Gonsalvez stevengonsalvez

💭
trying to be monkish
View GitHub Profile
name: called worfklow test
on:
workflow_dispatch:
jobs:
matrix:
env:
GITHUB_TOKEN: ${{ secrets.SAML_GITHUB_TOKEN }}
runs-on: ubuntu-latest
time latitude longitude heart_rate
14:00:19 48.87394696733226 2.2784619590510493 131
14:00:20 48.87394696733226 2.2784619590510493 131
14:00:21 48.873948618769646 2.278462360302607 131
14:00:22 48.87395040512085 2.2784627962112425 131
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stevengonsalvez
stevengonsalvez / user.py
Created May 9, 2021 07:08 — forked from psa-jforestier/user.py
List all inactive user of a GitHub organization using GitHub API
'''
List all inactive user of a GitHub organization
See user.py --help for usage.
Partially inspired by https://gist.github.com/morido/9817399
'''
import sys # to use sys.stdout
import os
from datetime import datetime
from time import strftime
import datetime
@stevengonsalvez
stevengonsalvez / lazy_users.py
Created April 26, 2021 10:02 — forked from morido/lazy_users.py
detect non-contributors in an organization
#!/usr/bin/env python
# you will need http://github3py.readthedocs.org/en/latest/#installation
# I'm not sure if this works on Windows due to the use of strptime()
from github3 import login
import datetime
import json
# Amend the following two lines as necessary
@stevengonsalvez
stevengonsalvez / example.md
Created April 21, 2021 09:33 — forked from mbohun/example.md
simple BASH/curl scipt for github REST API (HTTP GET queries)
$ ./githubapi-get.sh $GITHUBTOKEN /users/mbohun/repos
HTTP/1.1 200 OK
Server: GitHub.com
Date: Wed, 04 Mar 2015 04:30:29 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 155683
Status: 200 OK
@stevengonsalvez
stevengonsalvez / steve-yegge-platform-rant-follow-up.md
Created April 8, 2021 15:17 — forked from kislayverma/steve-yegge-platform-rant-follow-up.md
The one after platforms where Steve Yegge shares Amazon war stories

By Steve Yegge

Last week I accidentally posted an internal rant about service platforms to my public Google+ account (i.e. this one). It somehow went viral, which is nothing short of stupefying given that it was a massive Wall of Text. The whole thing still feels surreal.

Amazingly, nothing bad happened to me at Google. Everyone just laughed at me a lot, all the way up to the top, for having committed what must be the great-granddaddy of all Reply-All screwups in tech history.

But they also listened, which is super cool. I probably shouldn’t talk much about it, but they’re already figuring out how to deal with some of the issues I raised. I guess I shouldn’t be surprised, though. When I claimed in my internal post that “Google does everything right”, I meant it. When they’re faced with any problem at all, whether it’s technical or organizational or cultural, they set out to solve it in a first-class way.

Anyway, whenever something goes viral, skeptics start wondering if it was faked or staged. My accident

@stevengonsalvez
stevengonsalvez / steve-yegge-google-platform-rant.md
Created April 8, 2021 13:49 — forked from kislayverma/steve-yegge-google-platform-rant.md
A copy (for posterity) of Steve Yegge's internal memo in Google about what platforms are and how Amazon learnt to build them

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 really have SREs and they make engineers pretty much do everything,

const sodium = require("tweetsodium");
const key = process.argv.slice(2)[0]
const value = process.argv.slice(2)[1]
const encryptedBytes = sodium.seal(Buffer.from(value), Buffer.from(key, 'base64'));
const encrypted = Buffer.from(encryptedBytes).toString('base64');
console.log(encrypted);

Terraform over ARM any day

  • The JSON of ARM is so hard to read or write from scratch . it is super hierarchial and really cluttered . HCL is much more readable and even writing from scratch is not a pain
  • The interpolation is really way better in HCL compared to ARM . Eg: Inabaility to ingest a map as an interpolated value (for environment variables)
  • A bit of conditional operations (for each , ternary etc) in HCL.
  • Predictability: With the plan , it actually gives you what exactly will happen
  • Modularity with HCL (Dont get me started with Nested Syntax in ARM !!!) .
  • inability to create the resource group and the other resources in one template ? - why ?
  • Sematic versions (versions of api used etc) , cannot be declared as semantic parts of code.

ARM advantages