Skip to content

Instantly share code, notes, and snippets.

View gonzaloserrano's full-sized avatar
☁️
🧑‍💻

Gonzalo Serrano gonzaloserrano

☁️
🧑‍💻
View GitHub Profile
@sbailliez
sbailliez / vagrant-vmware-tech-preview-apple-m1-pro.md
Last active April 10, 2024 07:51
Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

UPDATE November 20, 2022: VMWare Fusion 13

VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.

Summary

This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated

@camh-
camh- / eol-at-eof.md
Created March 7, 2020 04:41
Please add newlines at end of files

See https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline

A newline in a text file is a terminator, not a separator. This means each line should have a newline at the end of it, including the last line of the file.

Many editors automatically add the newline at the end of the file. Some do not. If you can configure your editor to ensure there is always a newline at the end of every line, please do so.

Because many editors do add this newline, if you commit a text file without it, when someone else edits the file, their editor will (correctly) add the newline. This causes a spurious diff in the file. Spurious

You can use Ellie to "test" the code, changing only the result function and adding your extra code

Extra documentation to use this as reference:

Data Modeling exercises

1 - Represent a package containing:

  • barcode
package domain
// An Aggregate is a tree of object relations that protect business invariants (business rules).
// Concretely, an aggregates handle commands and have a state model encapsulated within it that allows
// it to implement the required command validation, thus upholding the invariants (business rules) of the aggregate.
// Aggregates are usually composed of several entities and values objects.
// The lifetimes of the components of an aggregate are bounded by the lifetime of the entire aggregate.
// Aggregate is abstract concept, it's just represented as an empty interface with no specific contract.
type Aggregate interface{}
@am
am / layersToArtboards.jsx
Last active December 12, 2018 20:57
Illustrator util to copy layers content to artboards
// based on https://github.com/michaelchaize/appliness/blob/master/Illustrator-create-artboards/CreateArtboardsLayers.jsx
// Illustrator util to copy layers content to artboards
// Each layer must contain one single group
// It will name the artboard to match the layer name
// For each 20 layers it creates a new row
// Ensure the original artboard is placed in the top left corner
// TODO: translate the original artboard on the top left corner
@davidalger
davidalger / sysadmin-shortcuts.md
Last active February 2, 2024 09:17
sysadmin-shortcuts

list listening ports

sudo lsof -nP -iTCP -sTCP:LISTEN
sudo netstat -plunt

flush DNS on Mojave

sudo killall -HUP mDNSResponder

immediately sleep displays

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

How to calculate your hourly rate as a freelancer?

Many people struggle with this question. Some just try to make as much as a full-time employee makes (and ignore that they won't be able to bill as many days). Others follow tips on startup related websites that suggest to ask for 20% to 50% more than an salary would yield (and ignore the additional risk and expenses they have).

Below you will find some numbers to help you calculate how high your hourly or daily rate should be.

Your yearly income should be higher than an average salary

  • You take more risk than full time employees, phases without income are likely
@drmalex07
drmalex07 / README-oneshot-systemd-service.md
Last active May 15, 2024 10:52
An example with an oneshot service on systemd. #systemd #systemd.service #oneshot

README

Services declared as oneshot are expected to take some action and exit immediatelly (thus, they are not really services, no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.

Let's create a example foo service that when started creates a file, and when stopped it deletes it.

Define setup/teardown actions

Create executable file /opt/foo/setup-foo.sh:

@acolyer
acolyer / service-checklist.md
Last active January 30, 2024 17:39
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?