Skip to content

Instantly share code, notes, and snippets.

View JefMari's full-sized avatar
🎯
Doing things to improve the lives of frontend devs

Jeferson Mari JefMari

🎯
Doing things to improve the lives of frontend devs
View GitHub Profile
@JefMari
JefMari / KnockoutJS-3.5.1-utilities.js
Created December 4, 2019 02:10
KnockoutJS 3.5.1 utilities
// knockout 3.5.1
ko.utils.addOrRemoveItem = function (array, value, included) { /* .. */ }
ko.utils.anyDomNodeIsAttachedToDocument = function (nodes) { /* .. */ }
ko.utils.arrayFilter = function (array, predicate) { /* .. */ }
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ }
@JefMari
JefMari / customizer.php
Created May 21, 2019 22:45
teamfridays_add_customize
function main_theme($wp_customize)
{
// Declare panel
$wp_customize->add_panel('teamfriday_theme', array(
'title' => 'TeamFridays Theme',
'description' => 'This is panel Description',
'priority' => 1,
));
// Main Banner Section
$wp_customize->add_section('main_banner', array(
@JefMari
JefMari / customizer.php
Created May 21, 2019 22:45
teamfridays_add_customize
function main_theme($wp_customize)
{
// Declare panel
$wp_customize->add_panel('teamfriday_theme', array(
'title' => 'TeamFridays Theme',
'description' => 'This is panel Description',
'priority' => 1,
));
// Main Banner Section
$wp_customize->add_section('main_banner', array(
@JefMari
JefMari / customizer.php
Created May 21, 2019 22:45
teamfridays_add_customize
function main_theme($wp_customize)
{
// Declare panel
$wp_customize->add_panel('teamfriday_theme', array(
'title' => 'TeamFridays Theme',
'description' => 'This is panel Description',
'priority' => 1,
));
// Main Banner Section
$wp_customize->add_section('main_banner', array(
/** Assuming na ang data sa backend ay gaya ng porma sa db.json,
ganito ko i-foformat ung paghandle natin ng data
**/
var companies = [],
departments = [],
locations = [],
employees = [];
(function(){
console.log('Common Module Started');
// Custom Multiple Selection Adapter
$.fn.select2.amd.define("CustomSelectionAdapter", [
"select2/utils",
"select2/selection/multiple",
"select2/selection/placeholder",
"select2/selection/eventRelay",
"select2/selection/single"
@JefMari
JefMari / Lawfirm.html
Created February 20, 2019 08:22
Test Lawfirm
<!DOCTYPE html>
<html>
<head>
<title>A Lawfirm Site</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">svg:not(:root).svg-inline--fa{overflow:visible}.svg-inline--fa{display:inline-block;font-size:inherit;height:1em;overflow:visible;vertical-align:-.125em}.svg-inline--fa.fa-lg{vertical-align:-.225em}.svg-inline--fa.fa-w-1{width:.0625em}.svg-inline--fa.fa-w-2{width:.125em}.svg-inline--fa.fa-w-3{width:.1875em}.svg-inline--fa.fa-w-4{width:.25em}.svg-inline--fa.fa-w-5{width:.3125em}.svg-inline--fa.fa-w-6{width:.375em}.svg-inline--fa.fa-w-7{width:.4375em}.svg-inline--fa.fa-w-8{width:.5em}.svg-inline--fa.fa-w-9{width:.5625em}.svg-inline--fa.fa-w-10{width:.625em}.svg-inline--fa.fa-w-11{width:.6875em}.svg-inline--fa.fa-w-12{width:.75em}.svg-inline--fa.fa-w-13{width:.8125em}.svg-inline--fa.fa-w-14{width:.875em}.svg-inline--fa.fa-w-15{width:.9375em}.svg-inline--fa.fa-w-16{width:1em}.svg-inline--fa.fa-w-17{width:1.0625em}.svg-inline--fa.fa-w-18{width:1.125em}.svg-in
@JefMari
JefMari / read.md
Created November 5, 2018 01:23
Delete all local branch except master

Delete all local branch except master and unmerged branch

git branch | grep -v "master" | xargs git branch -d

Delete all local branch except master

git branch | grep -v "master" | xargs git branch -D

<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
background: repeat url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/7QCIUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAGscAVoAAxslRxwCAAACAAAcAnQAV8KpIENoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbGQgLSBodHRwOi8vd3d3LnJlZGJ1YmJsZS5jb20vcGVvcGxlL0NoYWV5b3VuZ1dpbGxOZXZlckNoYWVvbAD/4gxYSUNDX1BST0ZJTEUAAQEAAAxITGlubwIQAABtbnRyUkdCIFhZWiAHzgACAAkABgAxAABhY3NwTVNGVAAAAABJRUMgc1JHQgAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLUhQICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFjcHJ0AAABUAAAADNkZXNjAAABhAAAAGx3dHB0AAAB8AAAABRia3B0AAACBAAAABRyWFlaAAACGAAAABRnWFlaAAACLAAAABRiWFlaAAACQAAAABRkbW5kAAACVAAAAHBkbWRkAAACxAAAAIh2dWVkAAADTAAAAIZ2aWV3AAAD1AAAACRsdW1pAAAD+AAAABRtZWFzAAAEDAAAACR0ZWNoAAAEMAAAAAxyVFJDAAAEPAAACAxnVFJDAAAEPAAACAxiVFJDAAAEPAAACAx0ZXh0AAAAAENvcHlyaWdodCAoYykgMTk5OCBIZXdsZXR0LVBhY2thcmQgQ29tcGFueQAAZGVzYwAAAAAAAAASc1JHQiBJRUM2MTk2Ni0yLjEAAAAAAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAA
@JefMari
JefMari / ko.utils.3.4.0.signatures.js
Created August 14, 2018 05:12 — forked from hyle/ko.utils.3.4.0.signatures.js
KnockoutJS 3.4.0 / 3.4.1 / 3.4.2 utils (ko.utils) signatures
// knockout 3.4.0
ko.utils.addOrRemoveItem = function (array, value, included) { /* .. */ }
ko.utils.anyDomNodeIsAttachedToDocument = function (nodes) { /* .. */ }
ko.utils.arrayFilter = function (array, predicate) { /* .. */ }
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ }