Skip to content

Instantly share code, notes, and snippets.

View deenison's full-sized avatar
💭
Hack thyself.

Denison Martins deenison

💭
Hack thyself.
View GitHub Profile
@deenison
deenison / convert_date_format_to_jqueryui_datepicker.php
Last active March 25, 2019 01:31
Simple conversion of WordPress i18n date format to jQuery UI Datepicker format
<?php
/**
* Converts a given WordPress date format to jQuery UI Datepicker format.
*
* @author Denison Martins <[email protected]>
*
* @see https://codex.wordpress.org/Formatting_Date_and_Time
* @see http://api.jqueryui.com/datepicker
*
* @throws InvalidArgumentException
@deenison
deenison / labels.md
Created September 26, 2016 21:14
Labels schema

Labeling issues

  • status: Only one status label can be assigned at once;
    • status:accepted: The issue was valid and now is selected for development;
    • status:duplicate: The issue was already described by another issue. Must be closed referencing the original issue. Followed by close action.
    • status:invalid: The issue will be closed and not be selected for development. Followed by close action;
    • status:solved: The issue was solved by a commit and the PR was successfully merged into master/development branches. Followed by close action;
    • status:wontfix: The issue couldn't be solved for any reason which must be described in the comments section. Followed by close action;
    • status:worksforme: The issue couldn't be reproduced and everything seems normal. Followed by close action.
  • priority: Only one priority label can be assigned at once;
@deenison
deenison / stringIsBoolean.js
Last active April 29, 2016 03:04
Gist that proposes have some fun with values (strings) that may or may not be a boolean.
/**
* Method that tests a string to check if it's value can be assumed as a (bool), regardless of being true/false.
* Note: If the string is empty, this function will return false since there's "no value" to be tested.
* @examples:
* "1".isBool() // returns true
* "yEs".isBool() // returns true
* "off".isBool() // returns true
* "".isBool() // returns false
* " ".isBool() // returns false
*