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
$.fn.removeClassPrefix = function( prefix ){ | |
var element = jQuery(this); | |
return this.each(function(){ | |
var c = this.classList; | |
jQuery.each(c, function(i, className) { | |
if( className.indexOf( prefix + "-" ) > -1 ){ | |
element.removeClass( className ); | |
} | |
}); | |
}) |
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
<?php | |
/* | |
* First array return "tags" with hash, example: #Example | |
* Second "tag" return without hash, Example: Example | |
* | |
* @string $tweet The text | |
* @function preg_match_all | Pattern | @string $tweet (The text) | @array $tags (output array the tags) | |
* @return array $tags | |
*/ | |
$twet = "But I must #explain to u how all this #mistaken idea of #denouncing pleasure and praising pain was born and I'll #give you a complete accout"; |
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
{ | |
"bin" : "10101101" | |
} |
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
// Inject start document code | |
Object.defineProperty(window, 'ysmm', { | |
set: function(val) { | |
var T3 = val, | |
I = '', | |
X = '', | |
key; | |
for (var m = 0; m < T3.length; m++) { | |
if (m % 2 == 0) { |
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
<?php | |
if( ! function_exists( 'mb_strpos' ) ){ | |
function mb_strpos( $haystack, $needles, $offset=0 ){ | |
return strpos( $haystack, $needle, $offset ); | |
} | |
} | |
function mb_strposa( $haystack, $needles = array(), $offset=0 ) { | |
$chr = array(); | |
foreach( $needles as $needle ){ |
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
<?php | |
function b256_to_b10_encode( $string, $encoding = "UTF-8" ) { | |
bcscale( 0 ); | |
$result = "0"; | |
for ($i = mb_strlen( $string, $encoding )-1; $i >= 0; $i--) { | |
$result = bcadd( $result, bcmul( ord( $string[$i] ), bcpow( 256, $i ) ) ); | |
} |
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
<?php | |
if( ! function_exists( 'mb_ucfirst' ) ){ | |
function mb_ucfirst( $string = '', $encoding = "UTF-8" ){ | |
if( empty( $string ) ) | |
return false; | |
$strlen = mb_strlen( $string, $encoding ); | |
$firstChar = mb_substr( $string, 0, 1, $encoding ); | |
$end_Char = mb_substr( $string, 1, $strlen - 1, $encoding ); |
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
RewriteCond %{THE_REQUEST} \ /(.+)\.aspx | |
RewriteRule ^ /%1.html [L,R=301] |
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
<?php | |
/** | |
* Add user date register in column | |
* | |
* @author Lenivene Bezerra | |
* @return columns and filter orderby date user registered | |
*/ | |
add_filter( 'manage_users_columns', 'column_user_registered' ); | |
function column_user_registered( $columns ) { | |
$columns[ 'user_registered' ] = __( 'Date' ); |