Skip to content

Instantly share code, notes, and snippets.

View wescleymatos's full-sized avatar
:octocat:
I'm ready!

Wescley Matos wescleymatos

:octocat:
I'm ready!
View GitHub Profile
@wescleymatos
wescleymatos / Startup.cs
Created October 9, 2018 20:01
Arquivo de startup web api 2
namespace Interface.Api
{
public class Startup
{
private static readonly string _urlBase = ConfigurationManager.AppSettings["UrlBase"];
private static readonly string _allowInsecureHttp = ConfigurationManager.AppSettings["AllowInsecureHttp"];
public void Configuration(IAppBuilder app)
{
HttpConfiguration config = new HttpConfiguration
@wescleymatos
wescleymatos / pr.conf
Created October 8, 2018 17:16
proxy reverse apache
ServerAdmin webmaster@localhost
ProxyRequests Off
ProxyPreserveHost On
ProxyVia Full
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/socket.io [NC]
RewriteCond %{QUERY_STRING} transport=websocket [NC]
RewriteRule /(.*) ws://127.0.0.1:3000/$1 [P,L]
@wescleymatos
wescleymatos / install_oci8_ubuntu_16.04_php7.1.md
Created June 18, 2018 19:16 — forked from hewerthomn/install_oci8_ubuntu_16.04_php7.1.md
How to install OCI8 on Ubuntu 16.04 and PHP 7.1
@wescleymatos
wescleymatos / myezbkp.sh
Created June 15, 2018 18:14 — forked from kriansa/myezbkp.sh
Easy MySQL incremental backups
#!/bin/sh
# ========================================================= #
# MyEzBkp
# Easy and simple backup of your entire MySQL Server.
#
# Ver: 1.0
# By: Kriansa
#
# This script requires root privileges to run!
# Tested only in RHEL based distros (Fedora & CentOS)
== For 64 bit arch
1. Download oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm and oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm from Oracle site
2. install alien: sudo apt-get install alien
3. install oracle instal client:
3.1 sudo alien -i oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
3.2 sudo alien -i oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
4. install php package
4.1 sudo apt-get install php5-dev
4.2 sudo apt-get install libcurl3-openssl-dev
@wescleymatos
wescleymatos / gitlab-ci.md
Created June 14, 2018 14:29 — forked from yancyn/gitlab-ci.md
Configure Gitlab CI with MSBuild

How To Configure CI With MSBuild

Make sure all required build tools are installed at build server.

  1. Install Runner on build server (download the version for OS).
  2. Configure runner. Enter URL and token from Project > settings > runners page. Choose executor as shell.
  3. Start command prompt with normal (DO NOT start as Administrator).
$ gitlab-runner register
$ gitlab-runner run
@wescleymatos
wescleymatos / comandos.sh
Last active May 29, 2018 16:54
Lista de comando Linux
# Verificar o tamanho do disco
fdisk -l /dev/sda
# Procurar um processo pelo nome
ps aux | grep solr
@wescleymatos
wescleymatos / linq_datatable.cs
Created March 23, 2018 12:07
Exemplo linq com Datatable
IEnumerable<DataRow> query = from avaliacao in tblAvaliacoesServidor.AsEnumerable()
where avaliacao.Field<decimal>("INSITUACAO") == 2
select avaliacao;
DataTable avaliacoesFinalizadas = query.CopyToDataTable<DataRow>();
var somaPontosAvaliacao = (from avaliacao in tblAvaliacoesServidor.AsEnumerable()
where avaliacao.Field<decimal>("INSITUACAO") == 2
select avaliacao.Field<decimal>("NUPONTUACAOTOTAL")).ToList().Sum();
@wescleymatos
wescleymatos / convert_img_to_base64.js
Created February 23, 2018 19:14
Converter link de uma imagem para base64
function toDataUrl(url, callback) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
var reader = new FileReader();
reader.onloadend = function() {
callback(reader.result);
}
reader.readAsDataURL(xhr.response);
};
xhr.open('GET', url);

Este PR é relacionado a qual issue?

connected to #


Este PR precisa de atenção especial em algum detalhe?

Caso positivo descreva aqui