Skip to content

Instantly share code, notes, and snippets.

View pesader's full-sized avatar
👣
Contributing to GNOME!

Pedro Sader Azevedo pesader

👣
Contributing to GNOME!
View GitHub Profile
@ErikKalkoken
ErikKalkoken / rtd_dark.css
Created June 15, 2022 12:12
Dark mode for Sphinx ReadTheDocs theme
/*!
* @name Readthedocs
* @namespace http://userstyles.org
* @description Styles the documentation pages hosted on Readthedocs.io
* @author Anthony Post
* @homepage https://userstyles.org/styles/142968
* @version 0.20170529055029
*
* Modified by Aloïs Dreyfus: 20200527-1037
* Modified by Erik Kalkoken: 20220615
@JayDoubleu
JayDoubleu / toolbox_update.yaml
Created January 11, 2021 19:25
Ansible update toolbox
- hosts: localhost
connection: local
tasks:
- name: Gather facts on a specific container
containers.podman.podman_container_info:
name:
- fedora-toolbox-33
- fedora-toolbox-34
register: toolbox_facts
@H0neyBadger
H0neyBadger / README.md
Last active July 31, 2022 15:14
Toolbox images

Toolbox containers

Build

podman build -f archlinux -t "archlinux:toolbox"

toolbox

toolbox create --container archlinux --image "archlinux:toolbox"
@tpopela
tpopela / install-dnf
Last active September 1, 2023 10:37
Simple script that unlocks the current OSTree deployment if needed and installs the dnf for debugging purposes
#!/bin/sh
# Run this script, then install the debuginfo packages with:
# sudo dnf debuginfo-install PACKAGE
set -e
tmp=$(mktemp -d)
cleanup () {
rm -rf $tmp
}
@brenopolanski
brenopolanski / export-svg-inkscape.md
Created December 26, 2017 13:29
Exporting an object as svg from inkscape
  1. Select the object(s) to export
  2. Open the document properties window (Ctrl+Shift+D)
  3. Select "Resize page to drawing or selection"
  4. File > Save As Copy...
  5. Select Optimized SVG as the format if you want to use it on the web
@amitab
amitab / fzf_ext.vim
Created October 26, 2017 16:56
Use cscope with FZF
function! Cscope(option, query)
let color = '{ x = $1; $1 = ""; z = $3; $3 = ""; printf "\033[34m%s\033[0m:\033[31m%s\033[0m\011\033[37m%s\033[0m\n", x,z,$0; }'
let opts = {
\ 'source': "cscope -dL" . a:option . " " . a:query . " | awk '" . color . "'",
\ 'options': ['--ansi', '--prompt', '> ',
\ '--multi', '--bind', 'alt-a:select-all,alt-d:deselect-all',
\ '--color', 'fg:188,fg+:222,bg+:#3a3a3a,hl+:104'],
\ 'down': '40%'
\ }
function! opts.sink(lines)
@redlotus
redlotus / docstrings.py
Created October 2, 2017 04:34
Google Style Python Docstrings
# -*- coding: utf-8 -*-
"""Example Google style docstrings.
This module demonstrates documentation as specified by the `Google Python
Style Guide`_. Docstrings may extend over multiple lines. Sections are created
with a section header and a colon followed by a block of indented text.
Example:
Examples can be given using either the ``Example`` or ``Examples``
sections. Sections support any reStructuredText formatting, including
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active July 24, 2024 07:10
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
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active July 22, 2024 07:23
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@kelvinst
kelvinst / local-gitignore.md
Last active April 17, 2024 21:39
Como fazer um .gitignore local?

Como fazer um .gitignore local?

Bom, este é um recurso, como muitos outros, bem escondido do git. Então resolvi fazer um post para explicar a situação em que pode-se usar e como fazer essa magia negra. 👻

O problema

Você provavelmente já adicionou algum dia um arquivo no projeto que não deveria ser commitado certo? E como você fez para ignorar esse arquivo mesmo? Provavelmente adicionou no arquivo .gitignore.

OK então, aí você commitou esse arquivo .gitignore e pronto, mais ninguém poderá criar um arquivo com o mesmo nome e commitar. Mas espera aí! Não era isso que você queria! Você só queria ignorar esse arquivo na sua máquina, se alguém, algum dia por obséquio achar esse um nome bom para seu arquivo, que assim seja.