Skip to content

Instantly share code, notes, and snippets.

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

Sergio Fernández xergiodf

🏠
Working from home
View GitHub Profile
@xergiodf
xergiodf / regexCheatsheet.js
Created January 17, 2019 11:59 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@xergiodf
xergiodf / README-Template.md
Created September 24, 2018 13:10 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@xergiodf
xergiodf / SimpleStore.js
Last active July 5, 2018 20:02 — forked from ksafranski/SimpleStore.js
Simple localStorage function with Cookie fallback for older browsers.
/**
* Simple localStorage with Cookie Fallback
* v.1.0.0
*
* USAGE:
* ----------------------------------------
* Set New / Modify:
* store('my_key', 'some_value');
*
* Retrieve:
@xergiodf
xergiodf / package.json
Created April 12, 2018 15:21 — forked from sethlopezme/package.json
Complete files for my article, Testing Hapi.js APIs. https://sethlopez.me/article/testing-hapi-js-apis
{
"name": "testing-hapi-js-apis",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"test": "ava --verbose test.js"
},
"dependencies": {
"ava": "^0.16.0",
"hapi": "^15.1.1"
@xergiodf
xergiodf / wildfly-install.sh
Created October 9, 2017 00:43 — forked from sukharevd/wildfly-install.sh
Script to install JBoss Wildfly 10.x as service in Linux
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 10.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2016-06-18T02:45-0700
#usage :/bin/bash wildfly-install.sh
#tested-version1 :10.0.0.CR3
#tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22
#tested-version2 :10.0.0.Final
@xergiodf
xergiodf / README.md
Created June 16, 2017 17:34 — forked from sgomezglobant/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@xergiodf
xergiodf / crawler.php
Created September 10, 2011 00:25 — forked from crodas/crawler.php
Bancard's goodness
<?php
/**
* Abrir la página de pago del comercio, la URL sería similar a esto:
*
* https://www.bancard.com.py/webbancard/?MIval=/ECOM/pagina_pagos.html&clavecomercio_input=29165&nro_pedido_input=416404080
*
* $com = clavecomercio_input = 29165
* $end = nro_pedido_input = 416404080
*/