Skip to content

Instantly share code, notes, and snippets.

View stevenquiroa's full-sized avatar
🌎
Working from home

Steven Quiroa stevenquiroa

🌎
Working from home
View GitHub Profile
@stevenquiroa
stevenquiroa / bitbucket-pipelines.yml
Created July 7, 2017 19:11
Bitbucket-pipelines, ssh, git-ftp
#Imagen con debian y git para el container.
#Se utiliza especificamente esta porque git-ftp necesita el paquete de git para funcionar
#Declaramos la imagen a utilizar
image: samueldebruyn/debian-git
#Iniciamos el pipeline
pipelines:
default:
- step:
@stevenquiroa
stevenquiroa / Dockerfile
Created December 5, 2016 16:18
Docke init
FROM wordpress:latest
RUN echo "\n log_errors = on\n error_log = /var/log/apache2/php_err.log" > /usr/local/etc/php/conf.d/php_error.ini && touch /var/log/apache2/php_err.log && chown www-data:www-data /var/log/apache2/php_err.log
@stevenquiroa
stevenquiroa / package.json
Last active December 13, 2016 21:51
gulpfile.js v2
// Gulp file for eu_musicales
// Compiles SASS, Concatenates and minifies vendors, and serves templates system for html css development
// "author": "Javier Castillo <javier@royalestudios.com>",
var gulp = require('gulp');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var minify = require('gulp-minify-css');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
@stevenquiroa
stevenquiroa / form-format.js
Created September 26, 2016 07:26
Form Format, pequeña libreria para formatear forms.
"use-strict";
var FormVM = function ( json_fields, callback ){
this.fields = {};
this.json_fields = json_fields;
this.response = {};
this.form = null;
this.rules = {
"required" : function( field_id, field ) {
const gulp = require('gulp');
const jshint = require('gulp-jshint');
const jsValidate = require('gulp-jsvalidate');
const exec = require('child_process').exec;
const map = require('map-stream');
const notifier = require('node-notifier');
const path = require('path');
const paths = {
'scripts': ['public/scripts/*.js']
@stevenquiroa
stevenquiroa / xhr.js
Last active June 8, 2016 17:52
Función xhr para hacer llamadas ajax
//funcion para hacer las llamadas ajax
function xhr (method, url, data, form, callback){
console.log('xhr')
var arr = new FormData()
if (method == 'get' || method == 'GET') {
var ret = [];
for (var d in data) ret.push(encodeURIComponent(d) + "=" + encodeURIComponent(data[d]));
var query = ret.join("&")
if (query) url = url + '?' + query;