Skip to content

Instantly share code, notes, and snippets.

@eduavila
eduavila / replaceAt
Created August 13, 2018 20:09 — forked from efenacigiray/replaceAt
Javascript replace char at index
function replaceAt(string, index, replace) {
return string.substring(0, index) + replace + string.substring(index + 1);
}
@eduavila
eduavila / index.html
Created August 29, 2018 13:57
Two way data binding with jquery
<div style="border: 1px solid pink; padding: 10px;" bind="any_name">This div's content
will be replaced when you edit the input below</div>
<input type="text" placeholder="First input with same bind value" bind="any_name"/>
<input type="text" placeholder="Second input with same bind value" bind="any_name"/>
<script>
$("*[bind]").on('change keyup', function (e) {
var to_bind = $(this).attr('bind');
$("*[bind='"+to_bind+"']").html($(this).val());
@eduavila
eduavila / request.js
Created September 2, 2018 13:52 — forked from sheharyarn/request.js
Axios Request Wrapper for React (https://to.shyr.io/axios-requests)
/**
* Axios Request Wrapper
* ---------------------
*
* @author Sheharyar Naseer (@sheharyarn)
* @license MIT
*
*/
import axios from 'axios'
@eduavila
eduavila / gitConfig
Last active October 19, 2018 11:24
Fix chage mode file git , old mode 100755 to new mode 100644
git config core.filemode false
@eduavila
eduavila / gist:6e57a3d356b624525ac690f897e6e1f0
Last active November 22, 2018 11:40
Erro PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Solução erro no window 10 , jdk1.8.0_181

  • PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target >keytool -list -keystore "%JAVA_HOME%/jre/lib/security/cacerts"

-ref: https://stackoverflow.com/a/9619478

@eduavila
eduavila / sh
Last active January 30, 2019 10:31
Erro make CentOS / install beanstalkd
yum install gcc gcc-c++ make
@eduavila
eduavila / supervisorctl.md
Last active May 31, 2019 14:56
Configuração para supervisord no CentOS 7

Instalar supervisor

$ yum install supervisor

Criar configuração para script

$ vi /etc/supervisord.d/nome-script.ini

  • command= Local do script a ser exetuado

[program:nome-queue]
@eduavila
eduavila / beanstalkd.md
Last active May 31, 2019 14:23
Instalando beanstalkd no CentOs

$ git clone https://github.com/beanstalkd/beanstalkd.git

$ cd beanstalkd

$ make

$ cp beanstalkd /usr/bin/beanstalkd

$ mkdir /var/lib/beanstalkd

@eduavila
eduavila / error.md
Last active February 11, 2019 12:08
[CodePush] Could not get binary hash.Error: Could not get binary hash.

Install cordova plugin add cordova-plugin-asset-manifest

@eduavila
eduavila / remotePackage.js
Created February 11, 2019 18:58
Error code push ionic
//Erro null code push ionic
//line 63 , remote package
var downloadError = function (error) {
_this.currentFileTransfer = null;
CodePushUtil.invokeErrorCallback(new Error(error.body), errorCallback);
};
// body erro return null case