Skip to content

Instantly share code, notes, and snippets.

View jubalm's full-sized avatar

Jubal Mabaquiao jubalm

  • Iloilo, Philippines
View GitHub Profile
@jubalm
jubalm / README.md
Last active February 3, 2020 15:15
Create React App IE support

Edit package.json file to include these browserslist configuration

{
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
 ],
@jubalm
jubalm / Default (OSX).sublime-keymap
Last active May 28, 2017 08:31 — forked from adrianmcli/Key Bindings — User.json
Enable Emmet autocompletion for React JavaScript/JSX
[
{"keys": ["tab"], "command": "expand_abbreviation_by_tab", "context":
[
{ "operand": "source.js", "operator": "equal", "match_all": true, "key": "selector" },
{ "match_all": true, "key": "selection_empty" },
{ "operator": "equal", "operand": false, "match_all": true, "key": "has_next_field" },
{ "operand": false, "operator": "equal", "match_all": true, "key": "auto_complete_visible" },
{ "match_all": true, "key": "is_abbreviation" }
]
}
<div class="test">
Hello World
</div>
<?php $subCategories = get_term_children($queried_object->term_id, 'product_cat') ?>
<?php if($queried_object->post_type == 'page'): $categories = get_terms('product_cat'); ?>
<?php foreach($categories as $category): ?>
<?php if($category->count && ($category->parent == 0)): ?>
<h4><?php echo $category->name ?></h4>
<?php echo do_shortcode('[product_category category="' . $category->slug . '"]'); ?>
<?php endif; ?>
<?php endforeach; ?>
@jubalm
jubalm / server.js
Created July 20, 2016 10:06
Simple express server
const path = require('path');
const express = require('express');
const port = process.env.PORT || 3000;
const server = express();
server.get('/favicon.ico', function(req, res) {
res.writeHead(200, { 'Content-Type': 'image/x-icon' });
res.end();
});
@jubalm
jubalm / sublime-emmet-react.md
Last active June 6, 2016 00:20
Enable Emmet Tab Completion in React (JSX)

Sublime Text 3 - Enable Emmet Tab Completion in React (JSX)

Instruction

Simply open your key binding settings Preferences > Key Bindings — User and add the snippet to your settings array

Reference

http://stackoverflow.com/a/31767887/1072776

@jubalm
jubalm / blockchainid
Last active May 26, 2017 21:32
Verifying that +jubalm is my blockchain ID. https://onename.com/jubalm
Verifying that "jubalm.id" is my Blockstack ID. https://onename.com/jubalm
@jubalm
jubalm / git-deploy.php
Created August 12, 2015 00:37
Git Deploy
<?php
date_default_timezone_set('Asia/Manila');
class Deploy {
/**
* A callback function to call after the deploy has finished.
*
* @var callback
@jubalm
jubalm / guide.html-rules.md
Last active August 29, 2015 14:26
HTML Authoring

HTML Authoring Conventions

  • HTML should present itself without the stylesheet
  • Check for unclosed tags
  • Check for Doctype declaration
  • Do not use inline-styles
  • Document should have title and meta tags
  • Do not use headings for font size
  • Use line breaks to separate text, not sections
  • Always put proper alt tags to images
@jubalm
jubalm / peninsula-updates.md
Created July 2, 2015 07:50
Spa Peninsula Updates

Updates

  • api is now set as per backend requirements from james
    • expect the dropdowns to be the sample data and changes as per selection
    • timepicker can be disabled while fetching time
  • form validation is now in place
    • input fields will validate as soon as you leave them
    • phone number validation
    • credit card validation
  • used these values for testing https://gist.github.com/jubalm/c38bf91499cc8ff0824d