Skip to content

Instantly share code, notes, and snippets.

View claudiouzelac's full-sized avatar
🎯
Focusing

claudiouzelac

🎯
Focusing
View GitHub Profile
# Use Google Cloud Platform stackdriver with python structlog
from google.cloud.logging import Client
from google.cloud.logging import _helpers
from google.cloud.logging.handlers import CloudLoggingHandler
from google.cloud.logging.handlers.transports.background_thread import _Worker
# pip install python-json-logger
from pythonjsonlogger import jsonlogger
@claudiouzelac
claudiouzelac / gist:2521f29ef757892c7980645a4ce13a4e
Created October 26, 2019 18:46 — forked from berlinbrown/gist:4583728
Simplest Possible Web Crawler with C++
//============================================================================
// Name : OctaneCrawler.cpp
// Author : Berlin Brown (berlin dot brown at gmail.com)
// Version :
// Copyright : Copyright Berlin Brown 2012-2013
// License : BSD
// Description : This is the simplest possible web crawler in C++
// Uses boost_regex and boost_algorithm
//============================================================================
@claudiouzelac
claudiouzelac / .pylintrc
Created October 10, 2019 17:15 — forked from xen/.pylintrc
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Profiled execution.

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

-------------------------- MODULE multi_user_wire --------------------------
EXTENDS Integers, Sequences
CONSTANTS Users, Servers, Accounts
MAX_MONEY == 20
AtMostOneAdminPerOrg(users, orgs) == {roles \in [users -> {"user","admin"}]:
\A x,y \in users: (roles[x] = "admin" /\ roles[y] = "admin") => x = y}
@claudiouzelac
claudiouzelac / attributes.rb
Created April 21, 2019 11:04 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.
@claudiouzelac
claudiouzelac / Packer-Windows.json
Created February 14, 2019 16:53 — forked from janegilring/Packer-Windows.json
Packer file for building Windows base images
{
"builders": [
{
"type": "hyperv-iso",
"output_directory": "./output-{{ user `os_name` }}-base-hyperv/",
"temp_path": "C:\\ClusterStorage\\HYPData01\\PackerTemplates\\temp",
"vm_name": "{{ user `os_name` }}-base",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"iso_checksum_type": "sha1",
@claudiouzelac
claudiouzelac / AzureMaint.ps1
Last active January 29, 2019 15:59
AzureMaint.ps1
workflow AzureMaint
{
}
@claudiouzelac
claudiouzelac / effective_modern_cmake.md
Created January 29, 2019 03:04 — forked from mbinna/effective_modern_cmake.md
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft