Skip to content

Instantly share code, notes, and snippets.

🏠
Freelance Life

Waren Gonzaga WarenGonzaga

🏠
Freelance Life
View GitHub Profile
@WarenGonzaga
WarenGonzaga / functions.php
Created Jan 10, 2020
Defer JavaScript via functions.php File
View functions.php
function defer_parsing_of_js( $url ) {
if ( is_user_logged_in() ) return $url; //don't break WP Admin
if ( FALSE === strpos( $url, '.js' ) ) return $url;
if ( strpos( $url, 'jquery.js' ) ) return $url;
return str_replace( ' src', ' defer src', $url );
}
add_filter( 'script_loader_tag', 'defer_parsing_of_js', 10 );
@WarenGonzaga
WarenGonzaga / usefulgitcmd_keep_fork_updated.md
Last active Dec 4, 2017
How to keep your forked repository up to date?
View usefulgitcmd_keep_fork_updated.md

Keep Your Forked Repository Up to Date!

Useful Git Commands

  • Add the remote from your original repository in your forked repository:

git remote add upstream git://github.com/original-developer/original-repository.git
git fetch upstream

  • Update your forked repository by typing the git command below:
@WarenGonzaga
WarenGonzaga / media_query_breakpoints.css
Created Nov 22, 2017
Media Query Breakpoints for Responsive Web Development.
View media_query_breakpoints.css
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {
/* Styles */
}
View custom_storefront_copyright_message.txt
@WarenGonzaga
WarenGonzaga / warens_led_music_visualizer.ino
Last active Apr 2, 2019
Waren's L.E.D Music Visualizer (The Project W.L.E.D.M.V)
View warens_led_music_visualizer.ino
/**
* Waren's LED Music Visualizer (Project W.L.E.D.M.V)
* by Waren Gonzaga
* Version: 1.0.1
*
* An Arduino project that translates the sound into lights.
* Check this project on Instructables.com
* Link: https://www.instructables.com/id/Warens-LED-Music-Visualizer
*
* Contribute to improve this project on gist!
@WarenGonzaga
WarenGonzaga / electronic_ultrasonic_emitter_basic.ino
Last active Mar 3, 2017
Electronic Ultrasonic Emitter (Project E.U.E) - Basic Version
View electronic_ultrasonic_emitter_basic.ino
/**
* Electronic Ultrasonic Emitter (Project E.U.E) - Basic Version
* by Waren Gonzaga
* Version: 1.0.6
*
* A simple project that emits ultrasonic waves and possible to repel mosquiotoes.
* Check this project on Instructables.com
* Link: https://www.instructables.com/id/Electronic-Ultrasonic-Emitter-Basic-Version/
*
* Contribute to improve this project on gist!
@WarenGonzaga
WarenGonzaga / electronic_matrix_ily.ino
Last active Feb 13, 2017
Electronic Matrix — I Love You (Project E.M.I.L.Y)
View electronic_matrix_ily.ino
/**
* Electronic Matrix — I Love You (Project E.M.I.L.Y)
* by Waren Gonzaga
* Version: 1.0.6
*
* A velentine project for saying I Love You!
* Check this project on Instructables.com
* Link: https://www.instructables.com/id/Electronic-Matrix-I-Love-You
*
* Contribute to improve this project on gist!
@WarenGonzaga
WarenGonzaga / HTML5Boilerplate.haml
Created Sep 9, 2016
This is the Haml version of HTML5 Boilerplate.
View HTML5Boilerplate.haml
!!!
%html.no-js{:lang => ""}
%head
%meta{:charset => "utf-8"}/
%meta{:content => "ie=edge", "http-equiv" => "x-ua-compatible"}/
%title
%meta{:content => "", :name => "description"}/
%meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}/
%link{:href => "apple-touch-icon.png", :rel => "apple-touch-icon"}/
/ Place favicon.ico in the root directory
@WarenGonzaga
WarenGonzaga / HTML5Boilerplate.jade
Created Sep 9, 2016
This is the version of HTML5 Boilerplate in Jade!
View HTML5Boilerplate.jade
doctype html
html.no-js(lang='')
head
meta(charset='utf-8')
meta(http-equiv='x-ua-compatible', content='ie=edge')
title
meta(name='description', content='')
meta(name='viewport', content='width=device-width, initial-scale=1')
link(rel='apple-touch-icon', href='apple-touch-icon.png')
// Place favicon.ico in the root directory
@WarenGonzaga
WarenGonzaga / disabledChromeShortcut.js
Created Sep 3, 2016
Disable Script to Disable Chrome Features
View disabledChromeShortcut.js
$(document).keydown(function(event){
if(event.keyCode==123){
disabledAlert();
console.log("Disabled! By GhostGeekBinary");
console.log("Trying to press F12");
return false; // Prevent from F12
}
else if(event.ctrlKey && event.shiftKey && event.keyCode==73){
disabledAlert();
You can’t perform that action at this time.