Skip to content

Instantly share code, notes, and snippets.

View sicdigital's full-sized avatar

Mike Chacon sicdigital

View GitHub Profile
@sicdigital
sicdigital / mc-validate.js
Created October 1, 2020 05:46 — forked from asuozzo/mc-validate.js
mc validation
/*!
* jQuery Form Plugin
* version: 3.51.0-2014.06.20
* Requires jQuery v1.5 or later
* Copyright (c) 2014 M. Alsup
* Examples and documentation at: http://malsup.com/jquery/form/
* Project repository: https://github.com/malsup/form
* Dual licensed under the MIT and GPL licenses.
* https://github.com/malsup/form#copyright-and-license
@sicdigital
sicdigital / gist:61e10e3fc41732bf23d893fe25ae8b0e
Created April 22, 2020 20:32
Basic Node Project Dockerfile
FROM node:latest
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . ./
version: '3'
services:
app:
working_dir: /app
build: .
stdin_open: true #https://github.com/facebook/create-react-app/issues/8688
volumes:
- .:/app
- /app/node_modules
ports:
FROM node:latest
WORKDIR /app
COPY package.json ./
RUN npm install
COPY . ./
CMD ['npm', 'start']
@sicdigital
sicdigital / responsive-image-loading.scss
Created March 16, 2019 18:58
Sass for implementing image placeholders of different aspect ratios
.image-loading-container {
display: block;
position: relative;
height: 0;
.image-container{
padding-bottom: 100%;
img {
position: absolute;
@sicdigital
sicdigital / Interval pinger with an alert
Last active July 19, 2018 02:54
Shell script to ping a domain until it works. Lets the user know when DNS has resolved
((minutes = 720)) # Total minutes to run
((rc = 3)) # set to none 0 value
while [[ $minutes -ne 0 && $rc -ne 0 ]] ; do
ping -c 1 localhost # Try once.
rc=$?
if [[ $rc -eq 0 ]] ; then
echo `say The Domain is Resolving.`
else
echo 'Not Found'
((minutes = minutes - 1)) # So we don't go forever.