Skip to content

Instantly share code, notes, and snippets.

View martylouis's full-sized avatar
🤓

Marty Thierry martylouis

🤓
View GitHub Profile
@martylouis
martylouis / download-website-images.js
Created October 12, 2023 22:41
Save all images on a website locally
async function selectDirectory() {
try {
const handle = await window.showDirectoryPicker();
return handle;
} catch (error) {
console.error("Error:", error);
}
}
function downloadImages(url, saveDirectoryHandle) {

Keybase proof

I hereby claim:

  • I am martylouis on github.
  • I am martylouis (https://keybase.io/martylouis) on keybase.
  • I have a public key ASAixACLhUJyQtT6yb264L0-gshVMuxXIpLaKXtnxZV9Bgo

To claim this, I am signing this object:

@martylouis
martylouis / .gitattributes
Created November 3, 2014 20:07
Fix line endings - .gitattributes
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
@martylouis
martylouis / .gitignore
Last active September 29, 2016 16:23
WP Engine .gitignore
node_modules
*.log
*.bak
*.swp
*~
.cvs
.DS_Store
.svn
Thumbs.db
@martylouis
martylouis / acf-config.php
Last active August 29, 2015 14:07
Advanced Custom Fields 5.0 Config
<?php
/**
* Advanced Custom Fields 5.0 Config
*/
$acf_path = 'acf.php';
require_once $acf_path;
@martylouis
martylouis / markdown-cheatsheet.md
Created August 7, 2014 19:46
Markdown Cheatsheet

Sample Markdown Cheat Sheet

This is a sample markdown file to help you write Markdown quickly :)

If you use the fabulous [Sublime Text 2/3 editor][ST] along with the [Markdown Preview plugin][MarkdownPreview], open your ST2 Palette with CMD+⇧+P then choose Markdown Preview in browser to see the result in your browser.

Text basics

this is italic and this is bold . another italic and another bold

@martylouis
martylouis / search-social-template.html
Created June 8, 2014 23:43
Search and Social Media Meta Tags Starter Template
<!doctype html>
<html>
<head>
<!-- SEO -->
<meta name="author" content="Nicholas Cerminara">
<meta name="description" content="Bootstrap 3 has a ton of features and helpers to speed up front-end development. Sometimes you need something and you end up writing your own custom CSS and JavaScript without even realizing that Bootstrap could have done it for you....">
<link rel="canonical" href="http://scotch.io/bar-talk/bootstrap-3-tips-and-tricks-you-might-not-know">
<!-- Social: Twitter -->
<!-- Heads up! You must visit the Twitter Validator and request approval after setting up your Meta tags. -->
@martylouis
martylouis / wp-tinyMCE4.php
Created April 23, 2014 22:29
A custom WordPress TinyMCE v4 configuration with styles (now called "Formats") drop down menu and submenus.
<?php
/**
* TinyMCE v4 Config
*
* A custom WordPress TinyMCE v4 configuration with styles (now called "Format") drop down menu with submenus.
*
* style_formats: http://www.tinymce.com/wiki.php/Configuration:style_formats
*
*/
@martylouis
martylouis / placeholder.js
Last active August 29, 2015 13:57
Get placeholders to work on all browsers
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() === input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
if (input.val() === '' || input.val() === input.attr('placeholder')) {
input.addClass('placeholder');
@martylouis
martylouis / svg-css.txt
Last active December 30, 2015 01:59
CSS properties for SVG
## FILL ##
fill Sets fill color of the shape.
fill-opacity Sets fill opacity of the shape.
fill-rule Sets fill rule of the shape.
** example **
fill: #ccc;
fill: rgba(0,0,0,.5);
fill: red;