This file contains 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 removeEmoji($text) { | |
$clean_text = ""; | |
// Match Emoticons | |
$regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u'; | |
$clean_text = preg_replace($regexEmoticons, '', $text); | |
// Match Miscellaneous Symbols and Pictographs |
This file contains 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
string function cleanEmoji(required string value){ | |
var gotourl = "/clean_emoji.php"; | |
var php = new http(url:gotourl,method:"post"); | |
php.addParam(type:"formfield",name:"value",value:arguments.value); | |
// Return trimmed response | |
return trim(php.send().getPrefix().fileContent); | |
} |
This file contains 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
[client] | |
default-character-set = utf8mb4 | |
[mysql] | |
default-character-set = utf8mb4 | |
[mysqld] | |
character-set-client-handshake = FALSE | |
character-set-server = utf8mb4 | |
collation-server = utf8mb4_unicode_ci |
This file contains 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
public string function cleanEmojiWithColdFusion(required string value){ | |
// Match Emoticons | |
var regexEmoticons = "[\x{1F600}-\x{1F64F}]"; | |
// Match Miscellaneous Symbols and Pictographs | |
var regexSymbols = "[\x{1F300}-\x{1F5FF}]"; | |
// Match Transport And Map Symbols | |
var regexTransport = "[\x{1F680}-\x{1F6FF}]"; | |
// Return cleaned and trimmed string | |
return arguments.value | |
.replaceAll(regexEmoticons,"") |
This file contains 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
<cfscript> | |
session.agentCheck = { | |
version : MobileDetect.getVersion(), | |
checkedOn : now(), | |
isMobile : MobileDetect.isMobile(), | |
isTablet : MobileDetect.isTablet(), | |
isIpad : MobileDetect.isIPad(), | |
isAndroid : MobileDetect.isAndroidOS(), | |
isIOS : MobileDetect.isIOS(), | |
// Example of how to define a Cordova app when using the AppendUserAgent option in the Config.xml |
This file contains 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
<cfscript> | |
// Usage | |
appSecret = "You App Secret Here"; | |
theUser = parseSignedRequest(form.signed_request,appSecret); | |
// if succesful you will see the entire struct | |
writeDump(theUser); | |
// the user id will be available as follows | |
writeOutput(theUser.user_id); |
This file contains 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
let _year = new Date().getYear()-100; | |
let _regex = new RegExp(`/${_year}$`); | |
document.querySelectorAll('.retableRow').forEach(a => { | |
let _date = a.querySelector('.date'); | |
if( !_regex.test(_date.innerText) ) | |
a.querySelector('.deleteBtn').click() | |
}) |
This file contains 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
// this is for example purpose only. Not actual values used | |
today = "01/01/2019"; | |
// use to work but generates an error now | |
createODBCDateTime(today & "23:59:59"); | |
// throws 01/01/201923:59:59 is an invalid date or time string. | |
// required fix ( add the required space ) | |
createODBCDateTime(today & " 23:59:59"); |
This file contains 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
try{ | |
ftpsClient = CreateObject("java","org.apache.commons.net.ftp.FTPSClient").init(JavaCast("boolean",true)); | |
// set server address to connect to and begin | |
ftpsClient.connect("yourserver.com",990); | |
// set credentials | |
loggedIn = ftpsClient.login("username","password"); | |
if (loggedIn){ | |
//enter passive mode | |
ftpsClient.enterLocalPassiveMode(); | |
// Set protection buffer size |
This file contains 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
cfsqltype(\s)?(=|:)(\s)?('|")(?!(cf_sql_bigint|cf_sql_bit|cf_sql_char|cf_sql_blob|cf_sql_clob|cf_sql_date|cf_sql_decimal|cf_sql_double|cf_sql_float|cf_sql_idstamp|cf_sql_integer|cf_sql_longnvarchar|cf_sql_longvarchar|cf_sql_money|cf_sql_money4|cf_sql_nchar|cf_sql_nclob|cf_sql_nvarchar|cf_sql_numeric|cf_sql_real|cf_sql_refcursor|cf_sql_smallint|cf_sql_sqlxml|cf_sql_time|cf_sql_timestamp|cf_sql_tinyint|cf_sql_varchar|bigint|bit|char|blob|clob|date|decimal|double|float|idstamp|integer|longnvarchar|longvarchar|money|money4|nchar|nclob|nvarchar|numeric|real|refcursor|smallint|sqlxml|time|timestamp|tinyint|varchar)('|")) |
OlderNewer