Skip to content
View micah1701's full-sized avatar
🏠
Working from home
🏠
Working from home

Organizations

@scapharma
Block or Report

Block or report micah1701

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned

  1. Extends bulma.io CSS framework with ... Extends bulma.io CSS framework with a short-lived notification message that slides up from the bottom of the screen. Useful for showing user that a change has occurred on the page. Requires jQuery.
    1
    /**
    2
     * display a quick notification box that slides up from the bottom for a few seconds
    3
     */
    4
    function quickNotice(message,cssClass,timeOnScreen)
    5
    {
  2. humblee humblee Public

    A humble PHP framework and CMS

    PHP 1

  3. Set the maximum character count of a... Set the maximum character count of a form field with jQuery, providing the user with a visual count and stripping any values entered greater than the predetermined amount.
    1
    <div>
    2
      <textarea id="myTextarea" class="lengthcount" maxlength="150"></textarea>
    3
    </div>
    4
    
                  
    5
    <div>
  4. Validate and sanatize a user entered... Validate and sanatize a user entered DEA Registration ID with PHP
    1
        /**
    2
         * Validate and clean a DEA Registration ID
    3
         * @param string $enteredValue user supplied DEA ID 
    4
         * @param string $lastname OPTIONAL extended validation requires first letter of users last name to match corresponding character in ID
    5
         * 
  5. Register multiple "ESC" key handlers... Register multiple "ESC" key handlers so hitting the escape key only does the most recently registered action. (requires jQuery)
    1
    var escEvents = new Array();
    2
    
                  
    3
    // If something needs to listen for the "ESC" key to be pressed, pass that functionality here
    4
    // eventName        STRING      a name for this event, like "myPopupDialog"
    5
    // eventFunction    FUNCTION    what to do when the user hits the escape key
  6. PHP function to convert a timestamp ... PHP function to convert a timestamp in the past to a human readable, rounded time frame. For example "2 years ago" or "1 minute ago" or even "Just Now" if in past X number of seconds.
    1
    <?php
    2
    function time_ago($pastTime)
    3
    {
    4
    	$datetime1=new DateTime("now");
    5
    	$datetime2=date_create($pastTime);