Skip to content

Instantly share code, notes, and snippets.

💭
Having Fun

Tony Brix UziTech

💭
Having Fun
Block or report user

Report or block UziTech

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@UziTech
UziTech / trimAll.js
Created Aug 6, 2014
Trim all strings in an object
View trimAll.js
/**
* DWTFYW License
*
* Author: Tony Brix, http://tonybrix.info
*
* This function trims all strings in an object or array
*
* This is useful when sending ajax requests
*
* var vals = {
@UziTech
UziTech / jquery.overlay.js
Last active Feb 11, 2016
jQuery simple overlay
View jquery.overlay.js
/*
* DWTFYW License
* Author: Tony Brix, http://tonybrix.info
*
* Simple overlay with text/html in the center and a delayed cancel button
* Requires jQuery
*
* if cancelTimeDelay is < 0 then there is no cancel button
*
*/
@UziTech
UziTech / mysqlddate.js
Created Aug 8, 2014
Format date as mySQL date format
View mysqlddate.js
/**
* DWTFYW License
*
* Author: Tony Brix, http://tonybrix.info
*
* Formats date in mm/dd/yyyy format as yyyy-mm-dd
*
* Returns false on failure
*
*/
@UziTech
UziTech / jquery.tooltiponoverflow.js
Created Aug 13, 2014
jquery plugin for showing tooltip on overflow
View jquery.tooltiponoverflow.js
/**
* DWTFYW License
* Author: Tony Brix, http://tonybrix.info
*
* jquery plugin for showing tooltip on overflow
*
* USAGE:
*
* $("input, select").tooltipOnOverflow();
*
@UziTech
UziTech / searchLog.php
Last active Aug 29, 2015
Show logs from a file that matches a regular expression
View searchLog.php
<?php
/**
* DWTFYW License
*
* Author: Tony Brix, http://tonybrix.info
*
* Show logs from a file that matches a regular expression. Matches multiline records.
* @param string $file The file to search
* @param string $search [optional] A string or regular expression to match; default = ""
@UziTech
UziTech / sendPost.php
Last active Aug 29, 2015
Send POST request to a webpage from php and return the response
View sendPost.php
<?php
/**
* Author: Tony Brix, http://tonybrix.info
*
* Send POST request to a webpage from php and return the response.
* @param string $url The url of the webpage you would like to send the request to.
* @param array $data The post data to send with the request.
* @return string The response of the request
*/
function sendPost($url, $data) {
@UziTech
UziTech / jquery.selectMultiple.js
Created Nov 21, 2014
HTML Select multiple without ctrl key
View jquery.selectMultiple.js
/**
* DWTFYW License
* Author: Tony Brix, http://tonybrix.info
*
* Set all multiple select elements to allow selecting multiple without using the ctrl key
*
*/
(function($){
$.fn.selectMultiple = function(){
return this.mousedown(function(e){
@UziTech
UziTech / getSearchTerms.js
Last active Aug 3, 2018
Get search terms
View getSearchTerms.js
/**
* DWTFYW License
*
* Author: Tony Brix, http://tonybrix.info
*
* Example:
* positive terms -----------V-----------V---------V-------V-----------------------V
* console.log(getSearchTerms("this -is 'a string' '-with' positive -'and negative' terms"));
* negative terms ----------------^-------------------------------------^
* Result:
@UziTech
UziTech / swapImage.js
Created Mar 13, 2015
jQuery plugin to swap new image after it loads. Useful if you want to load low res image first then swap with high res after it loads.
View swapImage.js
/*
* DWTFYW License
*
* Author: Tony Brix, http://tonybrix.info
*
* Swap an image after it loads. Useful if you want to load low res image first then swap with high res after it loads.
*/
(function ($) {
$.fn.swapImage = function (img) {
var $this = this;
@UziTech
UziTech / jquery.isOver.js
Created Mar 13, 2015
jQuery plugin to check if a point on the page is within an element.
View jquery.isOver.js
/*
* DWTFYW License
*
* Author: Tony Brix, http://tonybrix.info
*
* Check if a point is within an element.
* Useful for mouseover on absolutely positioned overlapping elements.
*
* Example:
* $(document).mousemove(function(e){
You can’t perform that action at this time.