Skip to content

Instantly share code, notes, and snippets.

View alvaropaco's full-sized avatar
🎯
Focusing

Alvaro Paçó alvaropaco

🎯
Focusing
View GitHub Profile
@alvaropaco
alvaropaco / index.html
Last active August 1, 2018 17:21
MRS Authentication// source https://jsbin.com/satufulisu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>MRS Authentication</title>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
<script>
$(document).ready(function(){
@alvaropaco
alvaropaco / polygons.txt
Created September 11, 2017 14:52
FreightHub Coding Challenge
2,2,2
2,4,2,4
3,3,3,3
2,3,4,5,6,7
ERROR in multi vendors
Module not found: Error: Cannot resolve 'file' or 'directory' /home/apaco/Projects/token-manager/adminlte-reactjs/node_modules/react in /home/apaco/Projects/token-manager/adminlte-reactjs
@ multi vendors
ERROR in multi vendors
Module not found: Error: Cannot resolve module 'reactDom' in /home/apaco/Projects/token-manager/adminlte-reactjs
@ multi vendors
ERROR in multi vendors
Module not found: Error: Cannot resolve 'file' or 'directory' /home/apaco/Projects/token-manager/adminlte-reactjs/node_modules/jquery/dist/jquery.min.js in /home/apaco/Projects/token-manager/adminlte-reactjs
@alvaropaco
alvaropaco / ubby-commit-msg
Created August 1, 2016 14:54
.gt/hook/ubby-commit-msg
#!/bin/sh
RED=$(tput setaf 1)
NORMAL=$(tput sgr0)
# Regex to validate a string contains "#" followed by 4 or 5 digits anywhere in the commit message
regex="^\[UBBY-[0-9]{2,}\]\s[\W\w]*\s@[\W\w]*$"
file=`cat $1` # The file that contains the commit message
# If the commit message does not match the regex
if [[ $file =~ $regex ]]; then
echo ${BASH_REMATCH[1]}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" />
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
@alvaropaco
alvaropaco / .html
Created May 23, 2016 13:19
Call some windows in a Click Jquery
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Teste JavaScript</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
</head>
<body>
<h1>Página de Teste</h1>
@alvaropaco
alvaropaco / example_sails_mocha_supertest
Created May 16, 2016 18:13
Example of test integration using Sails, Mocha and Supertest js
var request = require('supertest')
, localhost = 'http://localhost:1337/'
, redis = require('redis');
var client = redis.createClient();
describe('TimelineController', function() {
describe("should get", function() {
it("Unauthorized for anon requests", function (done) {
request(sails.hooks.http.app)