Skip to content

Instantly share code, notes, and snippets.

View ricardopadua's full-sized avatar
🎯
Focusing

Ricardo Pádua ricardopadua

🎯
Focusing
View GitHub Profile
@ricardopadua
ricardopadua / detect.livemd
Created November 2, 2024 02:23 — forked from ChristianAlexander/detect.livemd
Face Detection in Elixir

Face Detection in Elixir

Mix.install(
  [
    {:evision, "~> 0.1"},
    {:kino, "~> 0.7"}
  ],

Podcast Transcription

Mix.install([
  {:req, "~> 0.4.14"},
  {:fast_rss, "~> 0.5.0"},
  {:bumblebee, "~> 0.5.3"},
  {:exla, "~> 0.7.1"},
  {:kino, "~> 0.12.3"}
])
@ricardopadua
ricardopadua / GitCommitEmoji.md
Created September 11, 2024 21:21 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@ricardopadua
ricardopadua / .aws-creds
Created August 16, 2024 19:12 — forked from shawngmc/.aws-creds
Caddy Example Files
[default]
aws_access_key_id=XXXXXXXXXXXXXXXXXXXX
aws_secret_access_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
aws_region=us-east-1
@ricardopadua
ricardopadua / github_desktop_ubuntu.sh
Created August 28, 2023 16:32 — forked from berkorbay/github_desktop_ubuntu.md
To install Github Desktop for Ubuntu
## Follow this link for further updates to Github Desktop for Ubuntu https://github.com/shiftkey/desktop/releases/latest
# UPDATE (2022-11-07): Thanks to Sxvxgee's message, the updated code is as follows
sudo wget https://github.com/shiftkey/desktop/releases/download/release-3.1.1-linux1/GitHubDesktop-linux-3.1.1-linux1.deb
### Uncomment below line if you have not installed gdebi-core before
# sudo apt-get install gdebi-core
sudo gdebi GitHubDesktop-linux-3.1.1-linux1.deb
# UPDATE (2021-10-18): Thanks to Amin Yahyaabadi's message, the updated code is as follows
@ricardopadua
ricardopadua / wxWidgetInstall.md
Created June 7, 2023 22:43 — forked from pemd-sys/wxWidgetInstall.md
Installing wxWidgets

Installing wxWidgets on Ubuntu

The latest download and install instructions are available in
https://docs.wxwidgets.org/3.1/plat_gtk_install.html
The wiki is a bit old so try following the above and consult the wiki for more details. BUT, follow the steps as per the docs NOT the wiki.
https://wiki.wxwidgets.org/Compiling_and_getting_started

However sometimes specially for new linux users it can become overwhelming and installation process can throw funny errors. So I have created a step by step process to hopefully help you compile wxwidgets. Enjoy :-)

Installing pre-requisites

@ricardopadua
ricardopadua / tmux.conf
Created May 30, 2023 22:31 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@ricardopadua
ricardopadua / stream_csv.ex
Last active May 4, 2023 11:20 — forked from tngan/stream_csv.ex
Streaming CSV straight out of the database to the client using Elixir, Phoenix, Ecto and PostgreSQL.
def index(conn, _params) do
conn = conn
|> put_resp_content_type("text/csv")
|> put_resp_header("content-disposition", "attachment; filename=export.csv")
|> send_chunked(200)
Repo.transaction fn ->
Ecto.Adapters.SQL.stream(Repo, "COPY expensive_report TO STDOUT CSV HEADER")
|> Stream.map(&(chunk(conn, &1.rows)))
|> Stream.run
@ricardopadua
ricardopadua / netrw.txt
Created August 17, 2022 11:36 — forked from danidiaz/netrw.txt
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@ricardopadua
ricardopadua / config
Created March 1, 2022 01:51 — forked from pksunkara/config
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta