Skip to content

Instantly share code, notes, and snippets.

View anquegi's full-sized avatar

Antonio Juan Querol anquegi

View GitHub Profile
@anquegi
anquegi / Git_Behind_Proxy.md
Created September 24, 2024 09:08 — forked from ozbillwang/Git_Behind_Proxy.md
Configure Git to use a proxy (https or SSH+GIT)
@anquegi
anquegi / .direnvrc
Created July 12, 2024 16:04 — forked from ZhangChen199102/.direnvrc
Setup direnv + pyenv + pyenv-virtualenv
# use a certain pyenv version
use_python() {
if [ -n "$(which pyenv)" ]; then
local pyversion=$1
pyenv local ${pyversion}
fi
}
layout_virtualenv() {
local pyversion=$1
rustup component add rust-src
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
@anquegi
anquegi / test-cro.p6
Created September 8, 2022 06:02 — forked from chsanch/test-cro.p6
Cro::HTTP::Client example
sub get-term-id ( Cro::HTTP::Client $client, Str $value ) {
my $result;
try {
my $resp = await $client.get: 'terms?short_form=eq.' ~ $value;
# headers => [
# Cro::HTTP::Header.new(
# name => 'Accept',
# value => 'application/vnd.pgrst.object+json'
@anquegi
anquegi / README.md
Created September 1, 2022 15:39 — forked from tsara27/README.md
RMagick 2.16.0 installation on Arch Linux/Manjaro

Installation Guidance

  1. Install libmagick6 via terminal.
sudo pacman -S libmagick
  1. Install Homebrew for Linux. https://docs.brew.sh/Homebrew-on-Linux
  2. Install ImageMagick6 via homebrew.
brew install imagemagick@6
@anquegi
anquegi / better-errors-file.el
Last active October 3, 2019 11:23
When using ruby better errors gem and emacs restclient package, When the Api has an error the raw html of better errors is the response so in order to filter the filename and line you can use this function
(defun better-errors-file ()
(interactive)
(let ((root (libxml-parse-html-region (point-min) (point-max))))
(message "file: %s at line: %s"
(dom-attr (dom-by-class root "application") 'data-full-filename)
(dom-attr (dom-by-class root "application") 'data-line))))