Skip to content

Instantly share code, notes, and snippets.

View fedemzcor's full-sized avatar
🏠
Working from home

Federico Márquez fedemzcor

🏠
Working from home
View GitHub Profile
SELECT CleberQS.dbo.cleanVin(I.VIN) AS VIN ,I.Ubicacion, M.Descripcion_Marca,I.Estatus,I.Id_Tipo_Inventario,I.Id_Estatus_Inventario,A.Nombre_Agencia,I.Id_Grupo,I.Id_Agencia,Mv.Descripcion_Modelo_Version,I.Color_Exterior,I.Kms,I.Precio_Venta,I.Anio_Unidad,Img.Ruta_Imagen
FROM CleberODS.dbo.finventario_autos I
LEFT JOIN CleberODS.dbo.dModelo_Version Mv
ON Mv.Id_Modelo_Version = I.Id_Modelo_Version
AND Mv.Id_Grupo = I.Id_Grupo
LEFT JOIN CleberODS.dbo.dMarca M ON M.Id_Marca = Mv.Id_Marca AND M.Id_Grupo = Mv.Id_Grupo
LEFT JOIN CleberODS.dbo.dAgencia A ON A.Id_Agencia = I.Id_Agencia AND A.Id_Grupo = I.Id_Grupo
LEFT JOIN dealercom.[dbo].[Imagen_Seminuevo] Img ON Img.Numero_Inventario = I.Numero_Inventario
AND Img.Id_Grupo = I.Id_Grupo
WHERE A.Id_Grupo = '".$arg[0]."' AND A.Id_Agencia = '".$arg[1]."'
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
apt-get update
sudo apt-get install libssl-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install pkg-config libssl-dev libsslcommon2-dev
apt-get install php7.1-dev
pecl install mongodb
service php7.1-fpm restart
extension=mongodb.so
@fedemzcor
fedemzcor / nginx-tuning.md
Created March 1, 2018 08:50 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@fedemzcor
fedemzcor / README.md
Created March 10, 2018 19:52 — forked from brunogaspar/README.md
Install wkhtmltopdf on Ubuntu (14.04 64-bit) or (16.04 64-bit)

Install wkhtmltopdf on Ubuntu

This was tested on:

  • Ubuntu 14.04 x64
  • Ubuntu 16.04 x64

Installation

public String hexToString(String txtInHex)
{
System.out.println(txtInHex);
byte [] txtInByte = new byte [txtInHex.length() / 2];
int j = 0;
for (int i = 0; i < txtInHex.length(); i += 2)
{
txtInByte[j++] = Byte.parseByte(txtInHex.substring(i, i + 2), 16);
}
public void getVinList(){
FC.mDatabase.child(FC.route).child("vin").orderByValue().addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot snapshot) {
String[] spinnerArray;
Comandos git
git branch //Check current branch
git checkout -b "CambiosFede" //Create branch
git push -u origin CambiosFede //Upload content to branch
git branch -d CambiosFede //Delete branch
<?php
require('_session.php');
if(!isset($_SESSION['code_cashier_device'] ) || $_SESSION['code_cashier_device'] ==''){
$data = $gm->query("SELECT D.name,D.model,D.version,D.platform,D.manufacturer,D.uuid AS device_uuid,CD.id AS id_cashier_device FROM cashier_device CD INNER JOIN device D ON D.id = CD.id_device WHERE CD.id_cashier = ".$_SESSION['id_cashier']." AND CD.active = 1 AND CD.disable = 0")->fetch();
if($data == false){
header("location: device?choose_device=1");
}else{
$_SESSION['device_name'] = $data['name']; #$data['manufacturer'].'-'.$data['model'].'-'.$data['platform'].'-'.$data['version'];
$_SESSION['device_uuid'] = $data['device_uuid'];
package com.example.joner.cleberclcrfidwrite.ReadRFIds;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.constraint.ConstraintLayout;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
package com.cleber.cleberclcfield.Util;
import android.util.Log;
import android.widget.Toast;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public final class VINValidator {