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
  • 01:27 (UTC -03:00)
View GitHub Profile
@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 / crow_ibov.js
Created October 11, 2018 18:46
crow_ibov.js
1 const alpa = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'Y', 'X', 'Z', '0', '1', '2', '3', '4 ', '5', '6', '7', '8', '9'];
2
3 const rx = require('rx')
4 const request = require('request')
5 const cherio = require('cherio')
6
7 const url = x =>
8 `http://cvmweb.cvm.gov.br/SWB/Sistemas/SCW/CPublica/CiaAb/FormBuscaCiaAbOrdAlf.aspx?LetraInicial=${x}`
9
10 const load = cherio.load
@Pompeu
Pompeu / install_gemlist.rb
Created September 21, 2018 17:48
install_gemlist.rb
unless RUBY_VERSION == '1.8.7'
raise "user versão 1.8.7 você esta na #{RUBY_VERSION}"
end
list = []
File.open('./gemlist', 'r') do |f|
f.each_line do |line|
list << line
end
#! /bin/bash
# Description:
# Compile a full-featured Vim from source on Ubuntu/Debian distros. Based
# entirely on
# https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
#
# Use:
# ./compile_full_vim.sh
@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 / select.cs
Created August 16, 2018 02:03
select.cs
/*
tenta evitar for, foreach coiosas que mudão estados.
var listDtoTipoAquecimento = new List<DtoTipoAquecimento>();
foreach (var item in tipoAquecimentos)
{
listDtoTipoAquecimento.Add(
new DtoTipoAquecimento()
{
Id = item.Id,
@Pompeu
Pompeu / RandonProvider.cs
Created November 23, 2017 12:33
C# Randon
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System;
using System.Threading;
namespace Rextester
{
public class Program
@Pompeu
Pompeu / ap.js
Created May 17, 2017 00:28
ap.js
const five = require("johnny-five");
const rp = require('request-promise');
const board = new five.Board({
repl:false
});
const key = '?api_key=427d10b3-5493-4cc4-b6ed-d121edea162b';
const player = 'https://br1.api.riotgames.com/lol/summoner/v3/summoners/by-name/Soldierkill';
const currentGame = 'https://br1.api.riotgames.com/observer-mode/rest/consumer/getSpectatorGameInfo/BR1/';
(function () {
'use strict';
angular.module('app')
.factory('socket', socket);
socket.$inject =['$rootScope'];
function socket ($rootScope) {
/*
@Pompeu
Pompeu / parse.js
Created March 22, 2017 01:08
parse.js
/*
** SIEGE 3.0.8
** Preparing 100 concurrent users for battle.
The server is now under siege...
Lifting the server siege... done.
Transactions: 9700 hits
Availability: 100.00 %
Elapsed time: 19.19 secs
Data transferred: 0.16 MB