Skip to content

Instantly share code, notes, and snippets.

@tiagoamaro
tiagoamaro / apps.md
Last active March 29, 2024 19:09
Linux Apps
@tiagoamaro
tiagoamaro / .gitignore_global
Created August 3, 2018 12:58
Global .gitignore (Ignoring files most projects won't use)
# RubyMine
.idea/
# Vagrantfile
Vagrantfile
# docker-sync
.docker-sync/
docker-sync.yml
docker-compose.local-development.yml
@tiagoamaro
tiagoamaro / untilfail.sh
Created February 22, 2018 14:24
Run a command until it returns an exist status different than 0
# Author: James Healy (https://twitter.com/jim_healy)
#!/bin/bash
$@
while [ $? -eq 0 ]; do
$@
done
@tiagoamaro
tiagoamaro / vs_code_configuration.json
Last active May 21, 2018 13:00
VS Code Extensions
{
"editor.cursorBlinking": "solid",
"editor.fontSize": 13,
"editor.renderWhitespace": "all",
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 500,
"files.defaultLanguage": "markdown",
"workbench.editor.enablePreview": false,
"ruby.lint": {
"ruby": true

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@tiagoamaro
tiagoamaro / why_someone_isnt_using_my_software.md
Last active October 22, 2017 20:32
Why isn’t someone using my software product or open source tool?
@tiagoamaro
tiagoamaro / apartment_cleanup_without_database_cleaner.rb
Last active October 18, 2017 15:26
Clean up spec database tables without database_cleaner or database_rewinder (plus usage with Apartment gem)
class CleanupAllApartmentData
def self.call(schema_ary = [])
ar_conn = ActiveRecord::Base.connection
schema_ary.each do |schema|
Apartment::Tenant.switch!(schema)
ar_conn.disable_referential_integrity do
ar_conn
.tables
.map { |table| "DELETE FROM #{ar_conn.quote_table_name(table)}" }
@tiagoamaro
tiagoamaro / visual_studio_code_settings.json
Last active October 17, 2017 16:52
Visual Studio Code Settings
{
"editor.cursorBlinking": "solid",
"editor.fontSize": 13,
"editor.renderWhitespace": "all",
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 500,
"workbench.editor.enablePreview": false,
"workbench.fontAliasing": "antialiased",
"ruby.lint": {
"ruby": true
@tiagoamaro
tiagoamaro / Vagrantfile
Last active October 9, 2016 19:54
Vagrant (v2) for Rails
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure('2') do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@tiagoamaro
tiagoamaro / js_safe_navigation_benchmark.js
Last active April 2, 2020 21:43
JS safe navigation functions benchmark
import Benchmark from "benchmark";
import _ from "lodash";
// Source: http://codereview.stackexchange.com/questions/72253/safe-navigating-function-for-nested-object-properties
// Thanks to elclanrs
Object.reduce_attr = function (obj, props) {
return props.split('.').reduce(function(acc, p) {
if (acc === null) { return; }
return acc[p];
}, obj);