Skip to content

Instantly share code, notes, and snippets.

View madalinignisca's full-sized avatar
🏡
Open for business

Madalin Ignisca madalinignisca

🏡
Open for business
View GitHub Profile
@madalinignisca
madalinignisca / ServeCommand.php
Created October 24, 2020 06:19
Laravel Serve Command default to host 0.0.0.0
<?php
namespace App\Console\Commands;
use Illuminate\Foundation\Console\ServeCommand as OriginalServeCommand;
class ServeCommand extends OriginalServeCommand
{
protected function getOptions()
{
@madalinignisca
madalinignisca / Guardfile
Created June 19, 2020 22:49
Reference Guardfile at railstutorial.org/guardfile
require 'active_support/core_ext/string'
# Defines the matching rules for Guard.
guard :minitest, spring: "bin/rails test", all_on_start: false do
watch(%r{^test/(.*)/?(.*)_test\.rb$})
watch('test/test_helper.rb') { 'test' }
watch('config/routes.rb') { interface_tests }
watch(%r{app/views/layouts/*}) { interface_tests }
watch(%r{^app/models/(.*?)\.rb$}) do |matches|
"test/models/#{matches[1]}_test.rb"
end
@madalinignisca
madalinignisca / settings.ini
Created May 19, 2020 21:17
Set dark theme if available for any GTK 3 theme ~/.config/gtk-3.0/settings.ini
[Settings]
gtk-application-prefer-dark-theme = true
@madalinignisca
madalinignisca / apt.conf
Last active November 20, 2019 14:55
apt configuration for a clean, small, ideal debian/ubuntu based installation.
APT::Install-Recommends "false";
APT::Install-Suggests "false";
@madalinignisca
madalinignisca / cool.css
Last active August 1, 2019 08:14
some cool css properties
div {
/* this is the cool smooth background gradient on aws.amazon.com */
background-image: linear-gradient(0deg,#eaeded 0,#fff);
}
@madalinignisca
madalinignisca / .vimrc
Created July 26, 2019 17:55
My vimrc. A hybrid to work on both Linux and MacOS.
" Some plugins, colors and other things are expected.
" Check another time for complete instructions
" Set 'nocompatible' to ward off unexpected things that your distro might
" have made, as well as sanely reset options when re-sourcing .vimrc
set nocompatible
" Attempt to determine the type of a file based on its name and possibly its
" contents. Use this to allow intelligent auto-indenting for each filetype,
" and for plugins that are filetype specific.
@madalinignisca
madalinignisca / Adopting SRE Principles at StackOverflow.md
Created July 9, 2019 12:15
Notes about Site Reliability Engineering

Site Reliability Practices

Ben Treynor's SREcon14 Keynote

  1. Hire only coders.
  2. Have an SLA for your service.
  3. Measure and report performance against the SLA.
  4. Use Error Budgets and gate lanches on them.
  5. Have a common staffing pool for SRE and Developers.
  6. Have excess Ops work overflow to the Dev team.
  7. Cap SRE operational load at 50 percent.
alias docker_remove_all_containers='docker rm ($docker ps -aq)'
alias force_docker_remove_all_containers='docker rm -f ($docker ps -aq)
alias docker_remove_all_unused_volumes='docker volume prune'
alias docker_remove_all_images='docker rmi $(docker images -q)'
alias force_docker_remove_all_images='docker rmi -f $(docker images -q)'
@madalinignisca
madalinignisca / jargon.md
Last active August 22, 2018 10:12
Developers Jargon
  • IIFE -- immediately invoked function expression
  • closure -- technique for implementing lexically scoped name binding in a language with first-class functions
  • transpiler, transcompiler, source-to-source compiler -- is a type of compiler that takes the source code of a program written in one programming language as its input and produces the equivalent source code in another programming language