Skip to content

Instantly share code, notes, and snippets.

Replace

This command will replace the first letter for its upper case letter, after obj[' element

:%s/obj\['\(\w\)/obj['\u\1/g

Usage:

@panterozo
panterozo / Meld Conf Linux
Last active March 16, 2019 14:23
Meld Configuration
# Add the following to your .gitconfig file.
[diff]
tool = meld
[difftool]
prompt = false
[difftool "meld"]
cmd = meld "$LOCAL" "$REMOTE"

Keybase proof

I hereby claim:

  • I am panterozo on github.
  • I am panterozo (https://keybase.io/panterozo) on keybase.
  • I have a public key ASDyXQeq_t98wWEBtQNk6jVEl8QRuYfu7eunq1Gwe9AM0Ao

To claim this, I am signing this object:

@panterozo
panterozo / init.sh
Created August 16, 2018 15:48
Bash de creación de repo y ramas
echo ""
echo "* Se inicializa el proyecto"
echo "* $ git init"
echo ""
git init
echo ""
echo "* Se crean archivos .gitignore y README.md"
echo "* $ touch .gitignore y README.md"
{
"appVersion" : "3.5.1",
"jsonVersion" : "0.0.3",
"exchange" : {
"orionx" : {
"markets" : [
{
"basecurrency" : "BTC",
"pares" : [
"CHA",
@panterozo
panterozo / sudoku2.js
Created February 23, 2018 21:23
Ejercicios Realizados en CodeFights.com
function checkSize(seenBlock,value){
let count = seenBlock.size;
seenBlock.add(value);
if(seenBlock.size==count && value!="."){
console.log("break bloque: "+value);
return false;
}
return true;
}
@panterozo
panterozo / rotateImage.js
Created February 23, 2018 21:23
Ejercicios Realizados en CodeFights.com
function rotateImage(a) {
let array = [];
for(let i=0; i<a.length; i++){
let arrayIn = [];
let aux = 0;
for(let j=a[i].length-1; j>=0; j--){
//console.log("i:"+i+"|j:"+j+": "+a[j][i]);
arrayIn[aux]=a[j][i];
aux++;
}
@panterozo
panterozo / firstNotRepeatingCharacter.js
Created February 23, 2018 21:22
Ejercicios Realizados en CodeFights.com
function firstNotRepeatingCharacter(s) {
/*Se define un array al cual se irá sacando información*/
let length = s.length,result = [], seen = new Set(), notSeen = new Set();
let notOcurrance = "_";
for (let index = 0; index < length; index++) {
let value = s[index];
if (seen.has(value)){
notSeen.delete(value);
}else{
notSeen.add(value);
@panterozo
panterozo / firstDuplicate.js
Created February 23, 2018 21:21
Ejercicios Realizados en CodeFights.com
function firstDuplicate(a) {
let length = a.length,result = [], seen = new Set();
let firstOccurance = -1;
for (let index = 0; index < length; index++) {
let value = a[index];
if (seen.has(value)){
/*Guardo primera ocurrencia y quiebro*/
firstOccurance=value;
break;
}