Skip to content

Instantly share code, notes, and snippets.

View UziTech's full-sized avatar
💭
Having Fun

Tony Brix UziTech

💭
Having Fun
View GitHub Profile
@BJTerry
BJTerry / gist:32b491dc30788ec371e9
Created July 5, 2014 01:17
A naive way to get JQuery slide/fade animations in React.js
var JQuerySlide = React.createClass({
componentWillEnter: function(callback){
var $el = $(this.getDOMNode())
$el.slideDown(function(){
callback();
});
},
componentWillLeave: function(callback){
var $el = $(this.getDOMNode());
$el.slideUp(function(){
@UziTech
UziTech / trimAll.js
Created August 6, 2014 19:29
Trim all strings in an object
/**
* 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 February 11, 2016 20:25
jQuery simple overlay
/*
* 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 August 8, 2014 04:14
Format date as mySQL date format
/**
* 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 August 13, 2014 18:52
jquery plugin for showing tooltip on overflow
/**
* 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 August 29, 2015 14:05
Show logs from a file that matches a regular expression
<?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 = ""
@JoeStanton
JoeStanton / ntlm.js
Last active September 17, 2024 04:01
NTLM Authentication with node-fetch
/* eslint-disable no-console */
const https = require('https');
const fetch = require('node-fetch');
const ntlm = require('httpntlm').ntlm;
const keepAlive = new https.Agent({ keepAlive: true });
const handleErrors = (response) => {
if (!response.ok) {