Skip to content

Instantly share code, notes, and snippets.

View upadrian's full-sized avatar

Adrián Suárez upadrian

View GitHub Profile
@aryelgois
aryelgois / HttpResponse.php
Created February 20, 2018 01:44 — forked from ewwink/http_response_code.php
PHP Class for HTTP Response Status Codes
<?php
/**
* This Software is provided "as is" under the terms of the MIT license.
*
* @link https://opensource.org/licenses/MIT
*/
/**
* Provides named constants for HTTP protocol status codes and their messages
*
@mikemunsie
mikemunsie / phoneMasks.json
Last active March 12, 2026 15:40
Phone Masks by Country Code JSON
{
"AC": "+247-####",
"AD": "+376-###-###",
"AE": "+971-5#-###-####",
"AE": "+971-#-###-####",
"AF": "+93-##-###-####",
"AG": "+1(268)###-####",
"AI": "+1(264)###-####",
"AL": "+355(###)###-###",
"AM": "+374-##-###-###",
@ewwink
ewwink / http_response_code.php
Created February 14, 2016 02:30
PHP Class for HTTP Response Status Codes
<?php
/**
* StatusCodes provides named constants for
* HTTP protocol status codes. Written for the
* Recess Framework (http://www.recessframework.com/)
*
* @author Kris Jordan
* @license MIT
* @package recess.http
*
@ck-on
ck-on / ocp.php
Last active March 4, 2026 04:51
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
@jacksonfdam
jacksonfdam / gist:2853373
Created June 1, 2012 16:30
jQuery check if horizontal scroll is present
//util function to check if an element has a scrollbar present
jQuery.fn.hasScrollBar = function(direction)
{
  if (direction == 'vertical')
  {
    return this.get(0).scrollHeight > this.innerHeight();
  }
  else if (direction == 'horizontal')
  {
    return this.get(0).scrollWidth > this.innerWidth();