Skip to content

Instantly share code, notes, and snippets.

View BrunoCaimar's full-sized avatar

Bruno Caimar BrunoCaimar

View GitHub Profile
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
<script defer src="https://pyscript.net/latest/pyscript.js"></script>
</head>
<body>
<h1>Some places I have visited over the years:</h1>
<div id="folium"></div>
<py-config>
packages = ["folium"]
@davidfowl
davidfowl / MinimalAPIs.md
Last active June 24, 2024 06:15
Minimal APIs at a glance
@rponte
rponte / using-uuid-as-pk.md
Last active June 24, 2024 20:10
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@kislayverma
kislayverma / steve-yegge-google-platform-rant.md
Created December 26, 2019 07:11
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,

@helderdek
helderdek / SaveMap.cs
Created September 3, 2019 14:09
Transformando um AxMapControl em arquivo .MXD
public void saveMap()
{
IMapDocument mapDocument = new MapDocumentClass();
mapDocument.Open("C:\\temp\\Teste.mxd", string.Empty);
//if (mapDocument.get_IsReadOnly(@"[path to your .mxd]"))
//{
// System.Windows.Forms.MessageBox.Show("Map document \"" + @"[path to your .mxd]" + "\" is read only!");
// mapDocument.Close();
// return;
//}
@mauricedb
mauricedb / Subject under test
Last active December 7, 2023 14:46
Testing stateful React hooks
import { useState } from 'react';
export function useCounter(initial = 0) {
const [count, setCount] = useState(initial);
return [count, () => setCount(count + 1)];
}
@bparaj
bparaj / howto_python_flask_iis_wfastcgi
Last active December 1, 2023 05:42
Python Flask on IIS with wfastcgi
Assume IIS is installed. My machine already had IIs 8.5.
Install Python
==============
1. Download web installer (Python 3.6.3).
2. Run as Administrator.
3. Select custom installation for all users.
4. Choose install directory such that there are no white spaces in the path. Not sure if it needs to be done. Just being cautious.
5. Check the box for "Add Python 3.6 to PATH".
@chris-jamieson
chris-jamieson / functional-spec.md
Created March 9, 2017 16:06
Writing functional specification guidelines

Once you are ready to hire a developer, what should you do to mitigate execution / build risk?

  1. Writing a good functional specification is key to getting the build phase of this project right. It's not easy to do but it's mostly just about thinking hard and writing out all the boring details of your desired outcome. The best guide for this is Joel Spolsky (recently sold Trello for $425M). He wrote a 4 part series on this, starting here, and also has an example (real) spec on his website here (the PDF link is broken, this is the real one)

  2. Before you start on a spec, trim down your functionality to the absolute bare minimum - and be brutal with it! Imagine you had to complete it in one day, or imagine it was only a single feature... take away everything that isn't fundamental

@wboykinm
wboykinm / falsehoods.md
Last active February 1, 2024 15:52
Falsehoods programmers believe about addresses - by Michael Tandy

Falsehoods programmers believe about addresses

This is an anchor-linked version of the excellent, amazing original opus magnum by Michael Tandy.

An address will start with, or at least include, a building number.

Counterexample: Royal Opera House, Covent Garden, London, WC2E 9DD, United Kingdom.

When there is a building number, it will be all-numeric.

Counterexample: 1A Egmont Road, Middlesbrough, TS4 2HT

@vasanthk
vasanthk / System Design.md
Last active June 27, 2024 08:02
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?