Skip to content

Instantly share code, notes, and snippets.

@tiagoamaro
tiagoamaro / spotify_control
Created August 14, 2019 12:48
Spotify Control (Ubuntu)
#!/usr/bin/env bash
# Simple Spotify Control
# Just call ./spotify_control --help
# Source: https://community.spotify.com/t5/Desktop-Linux/Linux-keyboard-shortcuts/td-p/1626394
CMD="dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player"
case "$1" in
"playpause" )
@tiagoamaro
tiagoamaro / delete-git-status-files.sh
Created March 12, 2019 12:04
Delete all git status files
git status -s | cut -c4- | xargs rm -r
@tiagoamaro
tiagoamaro / apps.md
Last active January 15, 2025 13:51
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