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:51 (UTC -03:00)
View GitHub Profile
@rpragana
rpragana / VideoStream.md
Created November 30, 2017 18:47
Node video streaming

Cria uma stream de vídeo no nodejs plano (sem express ou outros módulos)

@rodtreweek
rodtreweek / vim_8_build
Last active August 28, 2018 11:39
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
@TySkby
TySkby / timeout.py
Last active June 5, 2024 17:06
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()
```
@haskellcamargo
haskellcamargo / .vimrc
Created August 24, 2016 11:28
Celão's Vim
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
" Always show statusline
set laststatus=2
@rponte
rponte / get-latest-tag-on-git.sh
Last active May 16, 2024 06:48
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
@masterl
masterl / autotest.sh
Last active November 18, 2015 12:42
Automated on-save test runner
#!/bin/bash
find `pwd` | grep "[.][ch]$" | grep -v "/.git/" | entr sh -c 'make test'
@justinweiss
justinweiss / filterable.rb
Last active January 11, 2024 07:28
Filterable
# Call scopes directly from your URL params:
#
# @products = Product.filter(params.slice(:status, :location, :starts_with))
module Filterable
extend ActiveSupport::Concern
module ClassMethods
# Call the class methods with names based on the keys in <tt>filtering_params</tt>
# with their associated values. For example, "{ status: 'delayed' }" would call
@havenwood
havenwood / benchmark_results.rb
Last active May 26, 2021 12:49
Benchmarking serialization speed of YAML, JSON, Marshal, and MessagePack in Ruby, JRuby, and Rubinius
# ruby-2.5.0
user system total real
YAML 15.112795 0.030577 15.143372 ( 15.190573)
JSON 0.648957 0.001520 0.650477 ( 0.652856)
Marshal 0.474775 0.000922 0.475697 ( 0.477678)
MessagePack 0.326430 0.001763 0.328193 ( 0.330159)
# ruby-2.4.3
user system total real
YAML 20.400000 0.050000 20.450000 ( 20.517600)