Skip to content

Instantly share code, notes, and snippets.

View lbrito1's full-sized avatar

Leonardo Brito lbrito1

  • frdm.co
  • Coquitlam, BC
  • 04:30 (UTC -07:00)
View GitHub Profile
@lbrito1
lbrito1 / nvidia-log
Created May 12, 2015 20:39
NVIDIA driver log 12/05/2015
This file has been truncated, but you can view the full file.
____________________________________________
Start of NVIDIA bug report log file. Please include this file, along
with a detailed description of your problem, when reporting a graphics
driver bug via the NVIDIA Linux forum (see devtalk.nvidia.com)
or by sending email to 'linux-bugs@nvidia.com'.
nvidia-bug-report.sh Version: 18957783
Date: Ter Mai 12 17:34:09 BRT 2015
@lbrito1
lbrito1 / xorg.conf
Created May 12, 2015 20:42
xorg.conf 12/05/2015
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 346.59 (buildmeister@swio-display-x86-rhel47-04) Tue Mar 31 14:42:07 PDT 2015
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
dictionary
diabos 'o brasileiro', 'o petista', 'o anti-olavete', 'o comunalha'
elevados 'Ludwig von Mises', 'Olavo de Carvalho', 'Rodrigo Constantino'
xingamento 'burro', 'um jumento', 'um asno', 'um imbecil'
elogio 'em sua obra magnífica', 'com sua mente genial', 'sabiamente', 'lindamente'
condenacao 'destruiu', 'esmagou', 'espatifou', 'esmigalhou'
adj_generico 'médio', 'nato', 'inexorável', 'eterno'
vl 'é', 'sempre foi'
rule 'afirmacao'
@lbrito1
lbrito1 / exch.c
Last active September 20, 2015 16:45
#include <stdio.h>
static inline void exchx(void** a, void** b) { void* p = *a; *a = *b; *b = p; }
int main(void) {
int a = 1;
int b = 2;
int c = 3;
int d = 4;
@lbrito1
lbrito1 / makefile
Last active October 14, 2015 18:44
CFLAGS=-D_DEBUG -lm -g
CFILES=../../utils/include/debug.h ../../utils/src/burgergfx.c ../../utils/src/comparators.c ../src/linked_list.c ../src/binary_tree.c ../src/binary_search_tree.c ../src/avl_tree.c ../src/red_black_tree.c ../src/heap.c ../src/vector.c
TARGET=bin/$@
SRC=./src/$@.c
TESTS=$(CC) $(CFILES) $(SRC) -o $(TARGET) $(CFLAGS)
linked_list_test:
$(TESTS)
# $HOME/.gitconfig
[user]
name = Leonardo Brito
email = lbrito@gmail.com
[core]
editor = vim
[alias]
aa = add --all
bv = branch -vv
ba = branch -ra
@lbrito1
lbrito1 / towebm.sh
Created October 27, 2015 13:49
MP4 to webm
# /home/lbrito/Documents/code/snippets/towebm.sh
for entry in "$search_dir"./*.mp4
do
entry=${entry:2}
output="${entry%.*}"
echo "Converting $entry to $output"
avconv -i "$entry" -c:v libvpx -maxrate 400k -qmax 32 -qmin 8 "$output.webm"
done
@lbrito1
lbrito1 / script_linked_list_output.txt
Created October 28, 2015 21:27
Output for the script_linked_list.py test.
lbrito@lbrito:~/Documents/code/cstuff$ python pywrap/script_linked_list.py
Creating list
List empty.
Adding 3 and 5
Printing list. Size = 2
head = 3 (0x635850) tail = 5 (0x6fb4c0)
----------------------------------
@lbrito1
lbrito1 / ode_to_oak.txt
Last active November 9, 2015 16:42
Ode to the Great Oak
Deep within the Virginia meadows
A lone Oak stands proud:
Cuban agents and communists in the shadows
He fights and denounces aloud
Experienced in Guénon, of Schoun a scholar
Esoteric ramblings, mighty sorcery
Are the Oak's ultimate power -
Said noone of global jewry!
@lbrito1
lbrito1 / bokeh_ticks.py
Created November 25, 2015 13:25
Bokeh desired_num_ticks interaction with custom x_range
import numpy as np
from bokeh.plotting import figure, show, output_file
x = range(0,100)
y = x
output_file("line.html", title="line.py example")
# p = figure(title="simple line example") # Works fine