Skip to content

Instantly share code, notes, and snippets.

View Pompeu's full-sized avatar
:octocat:
Focusing

Itacir Ferreira Pompeu Pompeu

:octocat:
Focusing
  • PompeuSolutions
  • Buriti Alegre - GO
  • 02:56 (UTC -03:00)
View GitHub Profile
@Pompeu
Pompeu / timeout.py
Created August 5, 2020 02:58 — forked from TySkby/timeout.py
Timeout decorator/context manager using signals (for Python 3)
#!/usr/bin/env python3
"""Easily put time restrictions on things
Note: Requires Python 3.x
Usage as a context manager:
```
with timeout(10):
something_that_should_not_exceed_ten_seconds()
```
@Pompeu
Pompeu / get-latest-tag-on-git.sh
Created February 12, 2019 18:52 — forked from rponte/get-latest-tag-on-git.sh
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
@Pompeu
Pompeu / vim_8_build
Created August 28, 2018 11:39 — forked from rodtreweek/vim_8_build
Building Vim 8 from source.
1.
sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev python3-dev ruby-dev lua5.1 lua5.1-dev libperl-dev git
2.
sudo apt-get remove vim vim-runtime gvim vim-tiny vim-common vim-gui-common vim-nox
3.
cd ~
git clone https://github.com/vim/vim.git
cd vim
@Pompeu
Pompeu / .eslintrc
Created February 16, 2016 10:21 — forked from ghostwords/.eslintrc
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"arrowFunctions": false, // enable arrow functions
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"classes": false, // enable classes
"defaultParams": false, // enable default function parameters
"destructuring": false, // enable destructuring
@Pompeu
Pompeu / autotest.sh
Last active August 29, 2015 14:25 — forked from masterl/autotest.sh
#!/bin/bash
find `pwd` | grep "[.][ch]$" | grep -v "/.git/" | entr sh -c 'make test'