Skip to content

Instantly share code, notes, and snippets.

View Marinofull's full-sized avatar
:shipit:
void

Marino Hohenheim Marinofull

:shipit:
void
View GitHub Profile
@Marinofull
Marinofull / routing_spec.rb
Created August 15, 2017 19:10
testing route match, not content from its response
require 'rails_helper'
RSpec.describe "routing things", :type => :routing do
api_prefix = "api/v1/"
my_unmatched_route = "some/unmatched/route"
it "routes to 404" do
expect(:get => api_prefix+my_unmatched_route).to route_to(
:format => :json,
:controller => api_prefix+"unmatch_route",
@Marinofull
Marinofull / gitconfig.md
Last active March 26, 2016 03:22
alias to see a fancy git log

got to ~/.gitconfig and add:

[alias]
  lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
  lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
  lg = !"git lg1"

Fedora sugestion:

While booting the system the GRUB2 menu will be displayed, to boot the system using bash follow these steps:

  • Use the arrow keys to select the boot entry you want to edit
  • Press e to start editing that entry
  • Use the arrow keys to go to the line that starts with linux or linux16
    • If you have a UEFI system it's the line that starts with linuxefi
  • Go the the end of that line add a space then rw then another space and init=/bin/bash
  • If your disk is encrypted, you may need to add plymouth.enable=0 as well
# reload ~/.tmux.conf using PREFIX r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# moving between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
@Marinofull
Marinofull / vimrc
Last active March 26, 2016 03:27
my personal vimrc file
"PATHOGEN"
execute pathogen#infect()
execute pathogen#helptags()
"general configs"
syntax on
filetype plugin indent on
set t_Co=256
@Marinofull
Marinofull / script.sh
Last active December 20, 2015 21:38
This source does a split in a `pdf` and renames its child based on their content
#The MIT License (MIT)
#
#Copyright (c) 2015 Marino Souza and Nilton Vasques
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
@Marinofull
Marinofull / hacking_bixurras.py
Last active September 5, 2015 13:29 — forked from fmasanori/hacking_bixurras.py
Código Xtreme Go Horse que fiz em 2 minutos para hackear fotos dos calouros da FATEC haha
#conteúdo do texto abaixo original de http://afterfest.com.br/fotos/XV-Edicao
texto = '''
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Fotos BIXURRASCO - XV Edicao - FATEC - 14/09/2013 - Afterfest</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="all" name="robots" />