Skip to content

Instantly share code, notes, and snippets.

View rpbaltazar's full-sized avatar
🧶
Knitting the next thing

Rui Baltazar rpbaltazar

🧶
Knitting the next thing
View GitHub Profile
@rpbaltazar
rpbaltazar / git-scrublocals
Created June 23, 2023 04:00
Clean local branches that no longer have a linked remote
#!/usr/bin/env ruby
# frozen_string_literal: true
puts 'Getting list of remote branches'
remote_branches = `git ls-remote origin |\
grep 'refs/heads/' |\
cut -c53-`.split "\n"
local_branches = `git branch |\
@rpbaltazar
rpbaltazar / MakeFile
Created July 18, 2022 06:47
git hook to add ticket number in the commit
init:
find .git/hooks -type l -exec rm {} \;
find .githooks -type f -exec ln -sf ../../{} .git/hooks/ \;
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
@rpbaltazar
rpbaltazar / resume.json
Last active November 5, 2022 07:31
My json resume
{
"meta": { "theme": "spartan" },
"basics": {
"name": "Rui Baltazar",
"label": "Lead Software Engineer / CTO",
"picture": "",
"email": "rui.p.baltazar@gmail.com",
"website": "https://rpbaltazar.com",
"summary": "I'm a Software Engineer with a Computer Science background, working in the industry since 2009. Thrilled by the start-up world, I'm an enthusiastic developer, proficient in getting things done. I never turn down a good challenge and I'm always seeking to learn. I believe that developers should actively contribute to OpenSource as a means to learn and give back to the community. On the free time, I'm a life lover by nature, play football on a regular basis and go out scuba-diving every now and then.",
"location": {
@rpbaltazar
rpbaltazar / server.py
Created October 7, 2020 01:23
python server.py
from http.server import HTTPServer, BaseHTTPRequestHandler
from io import BytesIO
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.end_headers()
@rpbaltazar
rpbaltazar / git flows
Created August 27, 2020 13:53
git flows
ousama--ooooooooo
|
develop----------------------------->ooooooooo
|
nuno________________________________>xxxx
gco develop
g pull
@rpbaltazar
rpbaltazar / rubocop-loop.sh
Created August 24, 2020 01:52
rubocop-loop.sh
# /bin/bash
x=0
while [ $x -eq 0 ]
do
rubocop -C false -a -F | grep 'offense detected' &> /dev/null
x=$?
echo "Finished $x"
done
echo $x
@rpbaltazar
rpbaltazar / Makefile
Last active May 24, 2020 08:55
githooks examples
init:
find .git/hooks -type l -exec rm {} \;
find .githooks -type f -exec ln -sf ../../{} .git/hooks/ \;
check_name: 'Rubocop Results'
versions:
- rubocop: '0.75.1'
- rubocop-rails: '2.3.2'
- rubocop-performance: '1.5.0'
- rubocop-rspec: '1.36.0'

Keybase proof

I hereby claim:

  • I am rpbaltazar on github.
  • I am rpbaltazar (https://keybase.io/rpbaltazar) on keybase.
  • I have a public key ASCkk3uhB1bExXUnUb4YnBqDtLXY-VRLflilN5x-urUXJQo

To claim this, I am signing this object: