Skip to content

Instantly share code, notes, and snippets.

View alexandreliberato's full-sized avatar
🏠
Working from home

Alexandre alexandreliberato

🏠
Working from home
View GitHub Profile
@alexandreliberato
alexandreliberato / main.go
Created September 2, 2024 18:07
Reading CSV file in Go with multiple delimiters
package main
import (
"encoding/csv"
"fmt"
"io"
"log"
"strings"
)
@alexandreliberato
alexandreliberato / gist:0ce01cac3761a2d161a332ab98c19f34
Created March 24, 2022 12:35 — forked from nicwolff/gist:2925803
'tcsh' Git prompt to show current branch
# in ~/bin/gitprompt.csh:
setenv GIT_BRANCH_CMD "sh -c 'git branch --no-color 2> /dev/null' | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /'"
set prompt="%m:%~ `$GIT_BRANCH_CMD`%B%#%b "
# and then in ~/.cshrc:
alias precmd "source ~/bin/gitprompt.csh"
@alexandreliberato
alexandreliberato / setup_go.md
Created June 23, 2021 14:35 — forked from rubencaro/setup_go.md
Golang installation guide

Golang installation guide

Since Golang version 1.11 this process is finally (almost) as easy as it should (!!). You can see full docs here. For older guides see here.

These are my notes, not a generic solution. They are not meant to work anywhere outside my machines. Update version numbers to whatever are the current ones while you do this.

Installing everything needed the first time

Install asdf and its golang plugin, then install golang

@alexandreliberato
alexandreliberato / ColorUtils.java
Created October 19, 2019 20:37 — forked from XiaoxiaoLi/ColorUtils.java
Java Code to get a color name from rgb/hex value/awt color. The part of looking up a color name from the rgb values is edited from * https://gist.github.com/nightlark/6482130 by Ryan Mast (nightlark)
import java.awt.Color;
import java.util.ArrayList;
/**
* Java Code to get a color name from rgb/hex value/awt color
*
* The part of looking up a color name from the rgb values is edited from
* https://gist.github.com/nightlark/6482130#file-gistfile1-java (that has some errors) by Ryan Mast (nightlark)
*
* @author Xiaoxiao Li
@alexandreliberato
alexandreliberato / conkyrc
Created July 8, 2019 17:17 — forked from 13Cubed/conkyrc
A simple and clean Conky config that displays system, processors, memory, disks, and top processes.
# .conkyrc
background yes
use_xft yes
xftfont Droid:normal:size=10
xftalpha 1
update_interval 1.0
top_cpu_separate true
total_run_times 0
own_window yes
@alexandreliberato
alexandreliberato / .gitignore
Created April 9, 2019 02:44 — forked from edesdan/.gitignore
A .gitignore file suitable for development with Java, Maven, Gradle, IntelliJ, Android Studio on a MacOS
# Reference: https://github.com/github/gitignore
# From: https://gist.github.com/edesdan/6bb43343740bcd54ef0f56a384a2f66f
######################
###### Mac OS X ######
######################
# Folder view configuration files
.DS_Store
Desktop.ini
@alexandreliberato
alexandreliberato / README-Template.md
Created April 7, 2019 22:42 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@alexandreliberato
alexandreliberato / extract_data.py
Created December 25, 2018 19:15 — forked from bkaankuguoglu/extract_data.py
This program extracts regular expressions within the given frame on a set of documents.
#=======================================================================#
# extract_data.py #
#=======================================================================#
# usage: extract_data.py [-h] [-i INPUT_DIR] [-o OUTPUT_DIR]
#
# This program extracts provision numbers from a set of documents.
#
# optional arguments:
# -h, --help show this help message and exit
# -i INPUT_DIR, --input_dir INPUT_DIR
$ git remote rm origin
$ git remote add origin [email protected]:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@alexandreliberato
alexandreliberato / README.md
Created May 17, 2018 13:55 — forked from hofmannsven/README.md
My simply Git Cheatsheet