Skip to content

Instantly share code, notes, and snippets.

View Edwardtonnn's full-sized avatar
🎯
Focusing

Edward Edwardtonnn

🎯
Focusing
  • Los Angeles Web Club
  • South Gate, CA
View GitHub Profile
@Edwardtonnn
Edwardtonnn / A.markdown
Created June 19, 2018 22:01 — forked from larrybotha/A.markdown
Export multiple artboards in Adobe Illustrator to png, or pdf

Export multiple Adobe Illustrator artboards to png, jpg, pdf

This is a reference to Matthew Ericson's article Export Illustrator Layers and/or Artboards as PNGs and PDFs in case something happens to happen to the article, and if I just forget where to find the exporter online.

Usage

  • Drop MultiExporter.js into /Applications/Adobe\ Illustrator\ CS6/Presets.localized/en_GB/Scripts
  • Restart Illustrator
@Edwardtonnn
Edwardtonnn / style.css
Created July 11, 2018 20:47
Mobile Display on Desktop Screen Genesis Sample Theme
/* Genesis Menu
--------------------------------------------- */
.genesis-nav-menu .menu-item {
display: inline-block;
}
.genesis-nav-menu .menu-item:focus,
.genesis-nav-menu .menu-item:hover {
position: relative;
@Edwardtonnn
Edwardtonnn / functions.php
Last active July 16, 2018 20:59
Genesis Create A Widget Area
<?php
/**
* Register our sidebars and widgetized areas.
*
*/
function custom_widget_add() {
register_sidebar( array(
'name' => 'Secondary Sidebar',
'id' => 'secondary_sidebar',
'before_widget' => '<div>',
@Edwardtonnn
Edwardtonnn / functions.php
Created July 17, 2018 17:07
Conditionally Enqueue JS file to certain pages of WP site. Specifically, NOT enqueue certain pages on WP site
<?php
//Function to add custom.js functionality to header only if the page is NOT contact page
add_action( 'wp_enqueue_scripts', 'conditional_header');
function conditional_header(){
if(is_page('contact') == false){
wp_enqueue_script(
'custom',
get_stylesheet_directory_uri() . '/js/custom.js',
array('jquery'),
@Edwardtonnn
Edwardtonnn / index.html
Created July 17, 2018 17:53
Snazzy Maps Layout
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<style type="text/css">
/* Set a size for our map container, the Google Map will take up 100% of this container */
#map {
width: 100%;
height: 350px;
}
</style>
@Edwardtonnn
Edwardtonnn / webdev_online_resources.md
Created July 23, 2018 18:17 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@Edwardtonnn
Edwardtonnn / functions.php
Created August 3, 2018 16:30
Adds multiple sidebars to any theme for WordPress
<?php
// Adds Widget Area
// Register Widgets
function custom_sidebar() {
register_sidebar(array(
'id' => 'my-new-widget',
'name' => __( 'My New Widget', 'text_domain' ),
'description' => __( 'This is my widget description.', 'text_domain' ),
@Edwardtonnn
Edwardtonnn / functions.php
Last active August 7, 2018 19:08
Enqueue Scroll Reveal js library
<?php
// Do not include opening php tag
//Scroll Reveal JS
add_action('wp_enqueue_scripts', 'load_scroll_reveal', 20);
if (is_front_page()){
// Scroll Reveal Main JS
wp_enqueue_script(
'scrollReveal',
! function ($) {
function getHashtag() {
var url = location.href;
return hashtag = -1 !== url.indexOf("#prettyPhoto") && decodeURI(url.substring(url.indexOf("#prettyPhoto") + 1, url.length)), hashtag && (hashtag = hashtag.replace(/<|>/g, "")), hashtag
}
function setHashtag() {
"undefined" != typeof theRel && (location.hash = theRel + "/" + rel_index + "/")
}
@Edwardtonnn
Edwardtonnn / functions.php
Created August 31, 2018 18:29
Loading Particles.js on WP website
<?php
//Particles JS
add_action('wp_enqueue_scripts', 'load_particles', 5);
function load_particles(){
// Particles JS
wp_enqueue_script(
'particles',
get_stylesheet_directory_uri() . '/js/particles.js',
array('jquery'),