Skip to content

Instantly share code, notes, and snippets.

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

deomorxsy

🐚
λx.x
  • PE, Brasil
  • 00:50 (UTC -03:00)
View GitHub Profile
@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 / 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-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 / 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)
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 / 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:
@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 / setxkbmap.md
Created March 28, 2021 12:57
configure keyboard to br-abnt2 pattern with setxkbmap

Setting up keyboard to br-abnt2:

[asari@asari ~]$ setxkbmap -print -verbose 10 
Setting verbose level to 10 
locale is C 
Trying to load rules file ./rules/evdev... 
Trying to load rules file /usr/share/X11/xkb/rules/evdev... 
Success. 
Applied rules from evdev: 
rules: evdev 
@deomorxsy
deomorxsy / life-utf8.c
Created April 25, 2021 22:29 — forked from katef/life-utf8.c
XBM to UTF-8 braille image things
/*
* John Conway's Game of Life.
*
* This is written for POSIX, using Curses. Resizing of the terminal is not
* supported.
*
* By convention in this program, x is the horizontal coordinate and y is
* vertical. There correspond to the width and height respectively.
* The current generation number is illustrated when show_generation is set.
*