Skip to content

Instantly share code, notes, and snippets.

View domzgarcia's full-sized avatar
🏠
Working from home

Dominador Garcia III domzgarcia

🏠
Working from home
View GitHub Profile
npm list -g --depth=0
<script type="text/javascript">
// # Navigation aesthetics
jQuery('.mainNav > li > a').each( (index, el) => {
const url = $(el).attr('href')
if(url === window.location.pathname){
$(el).parent().addClass('active')
}
})
</script>
@domzgarcia
domzgarcia / ekostudio-experiment2.js
Last active October 23, 2017 10:56
Code Eko Studio Complex
'use strict';
define([],function() {
let loadingScreen = {
playBlocker: '#button_loading_screen_1327f4',
playNormal: '#button_loading_screen_5ba756',
playHover: '#button_loading_screen_2cf0a7'
};
let uids = {
realityTopLayer: '#button_menu_layer_ae3db9',
let visibility = (comp['subform-allow-multiple-values']) ? '' : 'hidden';
return `<div class="subform" data-type="subform" data-form-id="${comp['form_id']}">
<label for="">${comp['field-label']}</label>
<div class="container-fluid subform-content">
${subforms.length===0?frm.render(true).wrapSubform(false):subformsHtml}</div>
<div class="form-group"> <span data-form-id=${comp['form_id']} class="form-btn subform-add ${visibility}"><i class="fa fa-plus"></i> Add ${comp['field-label']}</span></div>
<div class="clearfix"></div>
</div>`;

HOMEPAGE per segment with Responsive


Tablet / Mobile

  • Overall Homepage
  • Responsive Header
  • Responsive Footer 90%
  • Splash Page
  • Intro 2 Division
  • Blue Segment
@domzgarcia
domzgarcia / getcookiebyname.js
Created February 21, 2018 11:44 — forked from meandmax/getcookiebyname.js
get the cookie value by name if a cookie name exists.
/**
* get cookie by name without using a regular expression
*/
var getCookie = function(name) {
var getCookieValues = function(cookie) {
var cookieArray = cookie.split('=');
return cookieArray[1].trim();
};
var getCookieNames = function(cookie) {
@domzgarcia
domzgarcia / Php-OOP-experiments.php
Created October 5, 2018 08:13
Simple OOP with Interface, Inheritance and static properties.
<?php
interface IAnimal {
public function setSound($sound);
public function getSound();
}
class Animal implements IAnimal {
protected static $sound;
protected $type;
protected $name;
@domzgarcia
domzgarcia / filter-object-by-keys.js
Last active November 9, 2018 07:30
Filter, Object, keys, Allow, Include, exclude function and undefined
// Google Search
// Tags
// Filter, Object, keys, Allow, Include
// list of allowed properties
let allowed = ['prop', 'account', 'eVar']
// kindly see reponse json above
function filterByAllowedKeys(allowed, data){
<?php
class Pokemon
{
public function attack()
{
echo 'Punch';
}
public function rest()
{
@domzgarcia
domzgarcia / array-and-object-modify-via-spread.js
Created December 4, 2018 04:57
modifying data using spread on array and objects
let arr = ['only_one']
// console.log([...arr, 'two'])
let obj = { sub: {obj1:'one', obj2: 'two'} }
console.log( {...obj, sub:{...obj.sub, obj1: 'modify this using spread'}})