Skip to content

Instantly share code, notes, and snippets.

View hugobarauna's full-sized avatar

Hugo Baraúna hugobarauna

View GitHub Profile
@pixeltrix
pixeltrix / comparison.rb
Last active December 31, 2015 17:39
Comparison of functional tests vs. integration tests using current implementation and a simple implementation using Rack::Test
require 'benchmark/ips'
require "action_controller/railtie"
class BlogApplication < Rails::Application
config.eager_load = false
config.root = File.dirname(__FILE__)
config.session_store :cookie_store, key: 'session'
config.secret_key_base = 'secret'
end

Rondy Sousa (@plataforma.rondy): @brunno.santos, puxando o gancho no papo das descrições de MR, uma coisa que a gente costuma fazer é manter a descrição do MR no commit principal (title+descripton do MR batendo com o do commit).

A vantagem é que a motivação/propósito do MR ("pois o bundle da product já tem esse link salvo no banco") fica documentada no histórico do controle de versão (e agnóstico da plataforma de code review).

Brunno dos Santos (@brunno.santos): @plataforma.rondy interessante esse esquema que vcs usam de colocar a descrição no commit, mas o problema é definir qual é o commit principal, as vezes nem temos um. Como vocês lidam com isso?

Rondy Sousa (@plataforma.rondy): @brunno.santos, A gente faz squash dos commits antes de fazer merge no master, com o commit resultante recebendo o título + descrição do MR.

Na grande maioria das vezes, commits separados representam (ou deveriam representar) apenas "snapshots" de work-in-progress do MR. No momento do merge, eles acabam não acre

@Sanabria
Sanabria / toggle-applescript-dnd. scpt
Last active September 14, 2021 00:00
Applescript: Toggle Do Not Disturb mode
(* Note 1: The 1 after menu bar may need to be changed to 2 when using multiple monitors *)
(* Note 2: For 10.11 and newer “NotificationCenter” is now spelled “Notification Center”*)
tell application "System Events"
tell application process "SystemUIServer"
try
if exists menu bar item "Notification Center, Do Not Disturb enabled" of menu bar 1 of application process "SystemUIServer" of application "System Events" then
(* It is disabled *)
display dialog "Notifications will be turned on" buttons {"Got it"} default button 1
key down option
@rodrigues
rodrigues / euro-exchange.livemd
Last active August 10, 2023 13:45
💶 Euro Exchange Rates History 📈

💶 Euro Exchange Rates History

Run in Livebook

Mix.install([
  {:briefly, "~> 0.4.1"},
  {:req, "~> 0.3.10"},
@YurkoHoshko
YurkoHoshko / ollama_example.livemd
Last active September 27, 2024 19:04
Gist to run simple Livebook-based app that allows one-shot prompting with Ollama. Enjoy :) https://x.com/DJTechDebt/status/1818205498384036019

One-shot prompt with Ollama

Mix.install(
  [:ollama, :kino]
)

Simple one-shot chat :)