Skip to content

Instantly share code, notes, and snippets.

@javdome
javdome / vis_timeline_with_arror_first_test.html
Last active June 7, 2019 14:19 — forked from JimmyCheng/vis_timeline_with_arror_first_test.html
This is test to see how difficult it would be to add multiple arrows to vis.js timeline view. Can be previewed with https://gistpreview.github.io/?5c09b1cc4b21614255e8d426a6117e84
<!DOCTYPE html>
<html>
<head>
<title>Timeline | Group example, with an arrow</title>
<style>
body,
html {
font-family: arial, sans-serif;
font-size: 11pt;
@javdome
javdome / webpack.mix.js
Last active April 22, 2020 07:34
Mix + Tailwind + Purge (without sass) // Stand-Alone Projects
let mix = require('laravel-mix');
const tailwindcss = require('tailwindcss');
//If we don't use sass we will not need the purgecss wrapper of Laravel-mix
//Instead we use the original postCSS plugin.
const purgecss = require('@fullhuman/postcss-purgecss')({
// Specify the paths to all of the template files in your project
content: [
'./src/**/*.html',
@javdome
javdome / webpack.mix.js
Last active April 22, 2020 07:35
Mix + Tailwind + Purge + Sass // Stand-Alone Projects
let mix = require('laravel-mix');
//Requerimos Tailwind
const tailwindcss = require('tailwindcss');
//If we use sass we will need the purgecss wrapper of Laravel-mix
require('laravel-mix-purgecss');
// This opcion avoids to generate the file "app.js.LICENSE.txt" when is executed "npm run prod"
mix.options({
@javdome
javdome / zip.php
Created February 17, 2023 06:19
Zip the content of a folder in PHP
<?php
// Get real path for our folder
$rootPath = realpath('./folderToZip');
// Initialize archive object
$zip = new ZipArchive();
$zip->open('file.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE);
// Create recursive directory iterator
/** @var SplFileInfo[] $files */