This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT GROUP_CONCAT('kill ',id SEPARATOR '; ') AS kill_list | |
FROM INFORMATION_SCHEMA.PROCESSLIST | |
WHERE command='Sleep'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*{margin:0;padding:0;outline:0;font-size:1em;font-weight:normal;font-style:normal;border:0;text-decoration:none;list-style-type:none} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
FUNCTION stripHTML(strHTML) | |
Dim objRegExp, strOutput, tempStr | |
Set objRegExp = New Regexp | |
objRegExp.IgnoreCase = True | |
objRegExp.Global = True | |
objRegExp.Pattern = "<(.|n)+?>" | |
'Replace all HTML tag matches with the empty string | |
strOutput = objRegExp.Replace(strHTML, "") | |
'Replace all < and > with < and > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
Function in_array(element, arr, performTrim) | |
Dim i | |
in_array = False | |
For i=0 To Ubound(arr) | |
If performTrim Then '//there are some scenarios where you want to trim | |
If Trim(arr(i)) = Trim(element) Then | |
in_array = True | |
Exit Function | |
End If |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A (very) WIP collection of optimized/recommended jQuery plugin patterns | |
from @addyosmani, @cowboy, @ajpiano and others. | |
Disclaimer: | |
----------------------- | |
Whilst the end-goal of this gist is to provide a list of recommended patterns, this | |
is still very much a work-in-progress. I am not advocating the use of anything here | |
until we've had sufficient time to tweak and weed out what the most useful patterns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
FUNCTION URLDecoder(str) | |
'// This function: | |
'// - decodes any utf-8 encoded characters into unicode characters eg. (%C3%A5 = å) | |
'// - replaces any plus sign separators with a space character | |
'// | |
'// IMPORTANT: | |
'// Your webpage must use the UTF-8 character set. Easiest method is to use this META tag: | |
'// <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
'// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
' **************************************************************************** | |
' Sub: GetUtcOffsetMinutes | |
' Description: Gets the number of minutes between local time and UTC. | |
' | |
' Params: None | |
' **************************************************************************** | |
Function GetUtcOffsetMinutes() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://daker.me/2013/06/5-html5-javascript-apis-to-keep-an-eye-on.html | |
if (window.DeviceOrientationEvent) { | |
window.addEventListener('deviceorientation', function(event) { | |
var a = event.alpha, | |
b = event.beta, | |
g = event.gamma; | |
console.log('Orientation - Alpha: ' + a + ', Beta: '+ b + ', Gamma: ' + g); | |
}, false); | |
} else { | |
console.log('This device does not support deviceorientation'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jQuery Double Tap | |
* Developer: Sergey Margaritov (github.com/attenzione) | |
* License: MIT | |
* Date: 22.10.2013 | |
* Based on jquery documentation http://learn.jquery.com/events/event-extensions/ | |
*/ | |
(function($){ |
OlderNewer