Skip to content

Instantly share code, notes, and snippets.

View joaosds's full-sized avatar

João Augusto Sobral joaosds

View GitHub Profile
@mahynski
mahynski / notes_jax_numba.md
Last active January 3, 2025 02:15
Using Numba and JAX to Accelerate Python Code #notes

tl;dr

Numba is a "just in time" (jit) compiler for python. It is designed to optimize floating point operations and loops which makes it ideal for scientific code. The simplest way to use it is to decorate you function as shown below, which instructs Numba to compile the function into fast machine code the first time it is called.

from numba import jit

@jit(nopython=True)
def dotproduct(v1, v2):
	isum = 0.0
@phibr0
phibr0 / latex.css
Last active June 11, 2023 10:46
LaTeX inspired PDF's in Obsidian
/*
LaTeX inspired PDF Export Theme for https://obsidian.md
Made by @phibr0 on Github
Tested with Obsidians default Theme and the California Coast Community Theme
Please don't share this File with others, instead share this Link: https://www.buymeacoffee.com/phibr0/e/42263
*/
@ivan-pi
ivan-pi / linspace.f90
Created December 19, 2019 18:54
Linspace in Fortran
module linspace_mod
use iso_fortran_env, only: dp => real64
implicit none
contains
!>
! Return evenly spaced numbers over a specified interval.
!
! Returns `num` evenly spaced samples, calculated over the interval `[start, stop]`.
@dianjuar
dianjuar / i3-shortcuts-screenshot.md
Last active April 22, 2025 06:47
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots
@iPublicis
iPublicis / trelloinstall.sh
Last active July 16, 2024 16:40
Install Trello Linux Client
#!/bin/bash
# Your system should be 64 bits and check if the last version at https://github.com/danielchatfield/trello-desktop/ is 0.19
# If the current version is not 0.19 change the file name below accordingly
wget https://github.com/Racle/trello-desktop/releases/download/v0.2.0/Trello-linux-0.2.0.zip -O trello.zip
sudo mkdir /opt/trello
sudo unzip trello.zip -d /opt/trello/
sudo ln -sf /opt/trello/Trello /usr/bin/trello
echo -e '[Desktop Entry]\n Version=1.0\n Name=Trello Desktop\n Exec=/usr/bin/trello\n Icon=/opt/trello/resources/app/static/Icon.png\n Type=Application\n Categories=Application' | sudo tee /usr/share/applications/trello.desktop
@ObserverOfTime
ObserverOfTime / BDLinux.md
Last active March 7, 2025 10:49
Install BetterDiscord on Linux

Install BetterDiscord on Linux

This Gist contains simple instructions on how to install, update, and uninstall BetterDiscord on Linux.

For more thorough documentation, take a look at betterdiscordctl's README.

Do NOT submit issues here as I don't check the comments. You should submit them here instead.

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 19, 2025 05:22
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@rometsch
rometsch / i3autolock.md
Last active January 21, 2025 16:01
Configure lockscreen for i3 window manager.

The i3-wm does not come with a keybinding to lock the screen or a preconfigured auto lockscreen. This gist describes how to setup both using i3lock and xautolock. i3lock is a minimalistic lockscreen and xautolock monitors mouse and keyboard activities to automatically lock the screen after a certain time of beiing inactive.

First get the tools if neccessary. E.g. sudo apt install i3lock xautolock.

To setup the keybinding Ctrl+Alt+l (last one is a lowercase L) to lock the screen append the following lines to the i3 configuration file located at ~/.config/i3/config.

# keybinding to lock screen

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by