Skip to content

Instantly share code, notes, and snippets.

View hbueno's full-sized avatar
🎯
Focusing

Henrique Bueno dos Santos hbueno

🎯
Focusing
View GitHub Profile
@hbueno
hbueno / Inkscape_TexText_pdf2svg_Installation_Ubuntu.md
Created September 8, 2023 18:47
Guide for the installation of Inkscape with the TexText extension and pdf2svg on an Ubuntu system

Inkscape Installation with TexText Extension and pdf2svg on Ubuntu

This guide will walk you through the installation of Inkscape with the TexText extension and pdf2svg on an Ubuntu system. TexText is a powerful extension for Inkscape that allows you to embed LaTeX equations and symbols into your vector graphics.

1. Install Inkscape

Step 1: Add the Inkscape PPA (Personal Package Archive)

To install Inkscape on Ubuntu, it's recommended to use the Inkscape PPA to get the latest version. Open a terminal and run the following commands:

# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
@hbueno
hbueno / nltk_name_classifier.py
Created August 4, 2018 00:59 — forked from vinovator/nltk_name_classifier.py
Classifier to determine the gender of a name using NLTK library
# nltk_name_classifier.py
# Python 2.7.6
"""
Classifier to determine the gender of a name using NLTK library
Classification - task of choosing the correct class label for a given input.
Supervised classifier:
Classifier that is built on training corpora containing the correct label
@hbueno
hbueno / Makefile
Created May 31, 2018 16:48 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@hbueno
hbueno / isbn2bib.pl
Created May 23, 2018 19:26 — forked from DavidGriffith/isbn2bib.pl
Reads ISBN numbers from a file, checks them for validity, fetches the corresponding data from isbndb.com, then outputs a BibTeX file with all fields set accordingly. An API key from isbndb.com is required; see NOTES below.
#!/usr/bin/env perl
# David Griffith <davidgriffith@acm.org>
# isbn2bib version 0.4
# Copyright December 11, 2010
#
use strict;
use warnings;
grep -lr "palavra que queiro encontrar" *.tex
grep -ir "palavra que queiro encontrar" *.tex
defaults write org.vim.MacVim MMUseCGLayerAlways -bool YES
@hbueno
hbueno / bash_redirect_stderr_and_stdout.md
Last active May 4, 2018 16:25
Redirect stderr and stdout in Bash

Redirect stderr and stdout in Bash

commad 2>&1 | tee -a

Redirect stdout to one file and stderr to another file:

command > out 2>error

Redirect stderr to stdout (&1), and then redirect stdout to a file:

@hbueno
hbueno / convert_pdf_to_grayscale.md
Created May 4, 2018 15:43
Convert a PDF to greyscale on the command line

Using Imagemagick

convert -colorspace GRAY color.pdf gray.pdf

Via Ghostscript

@hbueno
hbueno / GoogleTranslate.workflow
Created May 3, 2018 01:08 — forked from buddax2/GoogleTranslate.workflow
Google Translate Automator Service
on run {input, parameters}
set output to "http://translate.google.com/translate_t?sl=auto&tl=uk&text=" & urldecode(input as string)
return output
end run
on urldecode(x)
set cmd to "'require \"cgi\"; puts CGI.escape(STDIN.read.chomp)'"
do shell script "echo " & quoted form of x & " | ruby -e " & cmd
end urldecode