Skip to content

Instantly share code, notes, and snippets.

View deomorxsy's full-sized avatar
🐚
λx.x

deomorxsy

🐚
λx.x
  • PE, Brasil
  • 06:06 (UTC -03:00)
View GitHub Profile
@deomorxsy
deomorxsy / solving-vim-errors_1.md
Last active March 26, 2021 18:31
solving vim-hug-neovim-rpc and ncm2 errors on vim 8.2.2653-1

26/03/2021

cd ~/.vim/bundle/
git clone https://github.com/roxma/vim-hug-neovim-rpc.git 
cd ~/path/you/want/to/clone/python-locallib.git
git clone https://aur.archlinux.org/python-locallib.git
cd ~/path/to/python-locallib.git
@deomorxsy
deomorxsy / comparative.rmd
Created March 5, 2021 15:24
Dois meios de mostrar imagens em arquivos rmd.
---
author: deomorxsy
title: Meios de mostrar imagens em arquivos rmd
date: 05/03/2020
output: pdf_document
---
# Abstract
Podemos usar as bibliotecas png e grid para exibir a imagem, especificando suas dimensões:
import pandas as pd
from tqdm import tqdm
import csv
import random
import string
from pyspark.sql import SparkSession
from pyspark.sql.functions import *
random.seed(1999)
@deomorxsy
deomorxsy / classic-format.md
Created September 22, 2020 19:14
classic way to format prints in python.
#!/usr/bin/python3
segundos=int(input())
h =segundos//3600
segundos =segundos%3600
minutos =segundos//60
segundos =segundos%60
print("%d:%d:%d", % h, minutos, segundos)
@deomorxsy
deomorxsy / pacman-latest.md
Last active September 14, 2020 23:09
get the pacman log file and redirect it to a .txt file
#!/bin/bash

touch pacman-latest.txt;
grep -i installed /var/log/pacman.log >> pacman-latest.txt;
@deomorxsy
deomorxsy / xinit-precedence.md
Last active October 26, 2023 15:54
Xinit's precedence order after invoked with startx

Part I

"If you log in in text mode then start a GUI session with xinit or with the wrapper script startx, then xinit does the following things:

  • Start an X server (typically through the script /etc/X11/xinit/xserverrc).
  • Usually run some scripts in /etc/X11 (typically /etc/X11/xinit/xinitrc), depending on how it's set up.
  • Run ~/.xinitrc, if it exists. If it doesn't exist, run a default client (traditionally xterm).
  • Once ~/.xinitrc terminates, kill the X server.

If you log in in graphical mode on an X display manager (xdm, gdm, kdm, wdm, lightdm, …), traditionally, what is executed after you log in is some scripts in /etc/X11 then ~/.xsession.

@deomorxsy
deomorxsy / pacman-utils.md
Last active September 14, 2020 15:43
Comandos utilitários do Pacman

Comandos adicionais

Faça o download de um pacote sem instalá-lo:

pacman -Sw nome_pacote
@deomorxsy
deomorxsy / git-editor.md
Created September 9, 2020 00:46
Changing git's code/text editor (to vim).

changing code editor in git:

  • Set core.editor in your Git config: git config --global core.editor "vim"
  • Set the GIT_EDITOR environment variable: export GIT_EDITOR=vim
@deomorxsy
deomorxsy / penDRIVE-the-iso.md
Last active September 9, 2020 00:48
Setting up a bootable USB drive. Works for Linux's ISOs; tested with Arch and Manjaro.

Is it previously booted?

wipefs --all /dev/sd[letter]

Is it currently for file storage? OK.*

mkfs.vfat -n 'PENDRIVE NAME' -I /dev/sd[letter]
@deomorxsy
deomorxsy / EFI-partition.md
Created September 3, 2020 02:39
EFI partition basic configuration with Parted and mkfs.fat

Creating partition

mkpart "EFI system partition" fat32 33MiB 512MiB

Setting partition flag for boot

set 1 esp on