Skip to content

Instantly share code, notes, and snippets.

Avatar

Manuel Lucena Pérez zamuro

View GitHub Profile
@zamuro
zamuro / gclbr.sh
Last active May 5, 2021
git cleanup branch
View gclbr.sh
branch_name=`git branch --show-current`
date_now=`date +%Y%m%d-%H%M`
diff_file=/tmp/$branch_name-$date_now.diff
echo "Saving to $diff_file"
git diff master $branch_name > $diff_file
git checkout master
git push origin $branch_name --delete
git branch -M $branch_name fuckings
git checkout -b $branch_name
git apply $diff_file
View gist:56cae2bfcf366bf22ee240f8be733b07
### Keybase proof
I hereby claim:
* I am zamuro on github.
* I am zamuro (https://keybase.io/zamuro) on keybase.
* I have a public key ASBR7pHj_R-P_GSxsO2VLxeV23Ris33u-DciF_xsI0Eg_go
To claim this, I am signing this object:
@zamuro
zamuro / main.go
Last active Nov 27, 2019
A simple program in Go to determine how many layers of clothing do I need and a convenient ºC to ºF converter
View main.go
package main
import (
"fmt"
"strconv"
)
func calculate (inpt string) {
a, _ := strconv.ParseFloat(inpt, 64)
if (a < 15 && a >= 10) {
@zamuro
zamuro / chuck.rb
Last active Nov 10, 2019
Use chucknorris.io API to get random git commit messages
View chuck.rb
#!/usr/bin/ruby
## PLACE THIS ON $HOME/bin (or wherever your $PATH executables are) and set appropiate permissions
require 'net/http'
require 'json'
def chuck
url = URI('https://api.chucknorris.io/jokes/random')
request = Net::HTTP.get(url)
response = JSON.parse(request)
response['value']
@zamuro
zamuro / config
Last active Jan 17, 2020
Terminator config
View config
[global_config]
suppress_multiple_term_dialog = True
[keybindings]
[profiles]
[[default]]
audible_bell = True
background_darkness = 0.95
background_type = transparent
cursor_color = "#aaaaaa"
font = JetBrains Mono Medium 12
@zamuro
zamuro / .gitconfig
Last active Sep 27, 2017
Configuration for automated pull for consul
View .gitconfig
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@github.com:[user or organization of your fork]/consul.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
View gist:b2127588b8766705ee17e49ec028aa9d
### Keybase proof
I hereby claim:
* I am zamuro on github.
* I am zamuro (https://keybase.io/zamuro) on keybase.
* I have a public key ASDpFj5GKqSQC1H9vPJc_Sx-W4OIb74j2XwwZy1xYS4BKwo
To claim this, I am signing this object: