View regex.txt
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
(http|ftp|https|ws|wss):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]) |
View select.js
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 checked = document.querySelectorAll('form#group-store select[name="employees[]"] :checked'); | |
checked = [...checked].map(option => option.value) |
View WebSocket.php
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 | |
class WebSocket | |
{ | |
private array $clients = []; | |
private $server; | |
private int $sleep = 0; |
View deepCopy.js
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
function deepClone(obj) { | |
/* | |
* Duplicates an object | |
*/ | |
var ret = null; | |
if (obj !== Object(obj)) { // primitive types | |
return obj; | |
} | |
if (obj instanceof String || obj instanceof Number || obj instanceof Boolean) { // string objecs |
View phpstorm.desktop
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
[Desktop Entry] | |
Version=2021.2.2 | |
Name=PHP Storm | |
Comment=PHP Programing Web IDE Text Editor | |
Keywords=Programming;IDE;Web;Text;Editor | |
Exec=/opt/php-storm-212.5284.49/bin/phpstorm.sh | |
Terminal=false | |
Type=Application | |
Icon=/opt/php-storm-212.5284.49/bin/phpstorm.svg | |
Categories=JetBrain;Programming;WebIDE; |
View Notification.php
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 | |
namespace App\WebSocket; | |
class Notification extends WebSocket | |
{ | |
} |
View js-issues-form.js
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
const from = document.querySelector('form#group-send-message'); | |
from.onsubmit = (e) => { | |
e.preventDefault(); | |
const selectedGroup = document.querySelector('div[data-active]'); | |
if (! selectedGroup) { | |
swal('Please! first Select a group chat.', 'error'); | |
return; | |
} |
View index.html
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
<!DOCTYPE html> | |
<html lang=""> | |
<head> | |
<meta charset='UTF-8'/> | |
<title>Chat Room</title> | |
</head> | |
<body> | |
<input type="text" name="name"> | |
<input type="text" name="message"/> |
View reset.sh
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
for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do | |
echo "Resetting trial period for $product" | |
echo "removing evaluation key..." | |
rm -rf ~/.config/$product*/eval | |
# Above path not working on latest version. Fixed below | |
rm -rf ~/.config/JetBrains/$product*/eval | |
echo "removing all evlsprt properties in options.xml..." |
View preview.js
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
<script> | |
document.querySelectorAll('input[type="file"]').forEach((el, index) => { | |
el.onchange = e => { | |
const file = e.target.files[0]; | |
if ( file ) { | |
el.closest('div[class*="col-md"]') | |
.querySelector('img').src = URL.createObjectURL(file); | |
} | |
} | |
}); |
NewerOlder