Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Chacon sicdigital

View GitHub Profile
View mc-validate.js
/*!
* 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
View gist:61e10e3fc41732bf23d893fe25ae8b0e
FROM node:latest
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . ./
View Create React App docker-compose.yml
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:
View Create React App Dockerfile for development
FROM node:latest
WORKDIR /app
COPY package.json ./
RUN npm install
COPY . ./
CMD ['npm', 'start']
@sicdigital
sicdigital / responsive-image-loading.scss
Created Mar 16, 2019
Sass for implementing image placeholders of different aspect ratios
View responsive-image-loading.scss
.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 Jul 19, 2018
Shell script to ping a domain until it works. Lets the user know when DNS has resolved
View Interval pinger with an alert
((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.
You can’t perform that action at this time.