Skip to content

Instantly share code, notes, and snippets.

View danieldsf's full-sized avatar

Daniel Farias danieldsf

  • Ion Systems
  • Parnaíba - PI - Brazil
  • 19:34 (UTC -03:00)
View GitHub Profile
@DavidWells
DavidWells / netlify.toml
Last active February 7, 2024 08:50
All Netlify.toml & yml values
[Settings]
ID = "Your_Site_ID"
# Settings in the [build] context are global and are applied to all contexts unless otherwise overridden by more specific contexts.
[build]
# This is the directory to change to before starting a build.
base = "project/"
# NOTE: This is where we will look for package.json/.nvmrc/etc, not root.
# This is the directory that you are publishing from (relative to root of your repo)
@ace-racer
ace-racer / Validatedate.js
Last active August 26, 2021 15:19
Validate date in JavaScript (dd/mm/yyyy format)
function validatedate() {
var dateText = document.getElementById("DATE_FIELD_NAME");
if (dateText) {
try {
var errorMessage = "";
var splitComponents = dateText.value.split('/');
if (splitComponents.length > 0) {
var day = parseInt(splitComponents[0]);
var month = parseInt(splitComponents[1]);
var year = parseInt(splitComponents[2]);
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 3, 2024 18:53
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@rvighne
rvighne / pixel8.js
Last active April 28, 2020 13:29
Pixel8 is as easy way to get the raw pixel data of an image, canvas, or video from the same domain. It uses the HTML5 Canvas's getImageData method, so Internet Explorer is only supported through FlashCanvas (http://flashcanvas.net). Simply call something like `var data = pixel8(image)` and then use `data.pixelAt(x, y)` to get a specific pixel's …
/*
Copyright (c) 2013 Rohit Vighne
License: The MIT License (MIT)
*/
function pixel8(image, x, y, w, h) {
"use strict";
// Image must be an image, canvas, or video
// For videos: Pixel data of the currently displayed frame will be extracted
@stanosmith
stanosmith / gist:2511057
Created April 27, 2012 17:31
HTML: Resize Facebook iframe FB.Canvas.setSize
<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css">
/* Hide the FB Root div */
#fb-root {
display: none;
}