Skip to content

Instantly share code, notes, and snippets.

View beeva-manueldepaz's full-sized avatar
🌴
Abandonware Profile :)

Manuel Eusebio de Paz Carmona beeva-manueldepaz

🌴
Abandonware Profile :)
View GitHub Profile
@beeva-manueldepaz
beeva-manueldepaz / index.html
Last active April 27, 2020 15:20
Template Responsive Under Construction / Maintenance - index.html (Bootstrap & JQuery by CDN)
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>We're under construction / Maintenance </title>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
@beeva-manueldepaz
beeva-manueldepaz / armagedocker.sh
Last active April 1, 2021 11:01
Script to delete all the images, containers and logs (path oriented to OsX)
#!/bin/sh
# HowTo
# Put it at /usr/local/bin/armaggeDocker.sh
# Give permissions: chmod a+x /usr/local/bin/armaggeDocker.sh
# Delete containers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
@beeva-manueldepaz
beeva-manueldepaz / killAllNodeModules.sh
Created May 22, 2016 10:27
Script to clean all npm & bower current instalations in a folder recursively
#!/bin/sh
# https://coderwall.com/p/guqrca/remove-all-node_module-folders-recursively
# $sudo mv /path/to/killAllNodeModules.sh /usr/local/bin/killAllNodeModules
# $sudo chmod a+x /usr/local/bin/killAllNodeModules
find . -name "node_modules" -exec rm -rf '{}' +
find . -name "bower_components" -exec rm -rf '{}' +
@beeva-manueldepaz
beeva-manueldepaz / killAllContainers.sh
Last active August 20, 2017 19:23
Script to stop and delete current running containers (useful to work with DevLab) or even images (commented by default)
#!/bin/sh
# [DevLab](https://github.com/TechnologyAdvice/DevLab)
# $sudo mv /path/to/killAllContainers.sh /usr/local/bin/killAllContainers
# $sudo chmod a+x /usr/local/bin/killAllContainers
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
#docker rmi $(docker images -q)
#docker rmi $(docker images -q --filter "dangling=true")
@beeva-manueldepaz
beeva-manueldepaz / parse.js
Created February 16, 2016 10:34
Example of usage node package: csv-to-json
/*
_ _
| | (_)
___ _____ ________| |_ ___ ______ _ ___ ___ _ __
/ __/ __\ \ / /______| __/ _ \______| / __|/ _ \| '_ \
| (__\__ \\ V / | || (_) | | \__ \ (_) | | | |
\___|___/ \_/ \__\___/ | |___/\___/|_| |_|
_/ |
|__/
@beeva-manueldepaz
beeva-manueldepaz / routing_by_object_mappings.js
Created March 17, 2015 10:17
Express sample to map queryParams in one route
var express = require('express')
var app = express()
app.get('/', function (req, res) {
var params = {};
if (!_.isUndefined (req.params.param1)) { params.param1 = req.params.param1; }
if (!_.isUndefined (req.params.param2)) { params.param2 = req.params.param2; }
if (!_.isUndefined (req.params.param3)) { params.param3 = req.params.param3; }
@beeva-manueldepaz
beeva-manueldepaz / prueba_promesas_q_v2.js
Last active August 29, 2015 14:07
Probando las promesas en node con Q (versión 2)
"use strict"
// Dependencias
var Q = require('q'); // Necesario instalar con $npm install Q
var http = require('http'); // Parte del core de node, no necesario instalar.
// Código de la función que devuelve una promesa
var promesa = function () {
console.log('Soy promesa: empiezo');
var d = Q.defer();
@beeva-manueldepaz
beeva-manueldepaz / prueba_promesas_q.js
Last active August 29, 2015 14:07
Probando las promesas en node con Q
"use strict"
// Dependencias
var Q = require('q'); // Necesario instalar con $npm install Q
var http = require('http'); // Parte del core de node, no necesario instalar.
// Código de la función que devuelve una promesa
var promesa = function () {
console.log('Soy promesa: empiezo');
var d = Q.defer();