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
Fix telescope path issue. | |
Auto Load Entries | |
0. mkdir -p resources/views/vendor/telescope | |
1. cp vendor/laravel/telescope/resources/views/layout.blade.php resources/views/vendor/telescope/ | |
2. window.Telescope.path = '{{ env('MIX_APP_NAME') }}/telescope'; in view | |
3. MIX_APP_NAME=Projects/catalet/public/ |
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 fetch_data($project_id) { | |
progress_bar_start(); | |
visible_column_list = []; | |
columnDefs = []; | |
/*Extracting Column name from List*/ | |
column_filter.each(function () { | |
visible_column_list.push({'data': $(this).val()}); |
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
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.support.ui import Select | |
import os | |
import shutil | |
import time | |
import ntpath | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.by import By |
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
// js | |
xhr: function() | |
{ | |
var xhr = new window.XMLHttpRequest(); | |
let duration_change = true; | |
//Download progress | |
xhr.addEventListener("progress", function(evt){ | |
if (evt.lengthComputable) { | |
var percentComplete = evt.loaded / evt.total; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
</head> | |
<body> | |
<div class="container"> | |
<h2>Button Styles</h2> | |
<button type="button" id="button1" class="btn">Basic</button> |
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() { | |
var proxied = window.XMLHttpRequest.prototype.open; | |
window.XMLHttpRequest.prototype.open = function() { | |
console.log( arguments ); | |
return proxied.apply(this, [].slice.call(arguments)); | |
}; | |
})(); |
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
sudo chown -R www-data:www-data html/ | |
sudo usermod -a -G www-data root | |
sudo find html/ -type f -exec chmod 644 {} \; | |
sudo find html/ -type d -exec chmod 755 {} \; | |
cd html/ | |
sudo chgrp -R www-data storage bootstrap/cache | |
sudo chmod -R ug+rwx storage bootstrap/cache | |
reference: https://stackoverflow.com/a/37266353 |
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
// let audio_url = 'https://media.licdn.com/media/AAMBAQQiAAgAAQAAAAAAAAriAAAAJDg2ZWY0MzhjLWQ5YTUtNDgyMy1hZjQ3LWYzM2RlOWRjZmZkYg.bin'; | |
let audio_url = 'https://fsb.zobj.net/download/bSCIjtRQgjq9_Y6tM5IdFilYEp18rUjolRsAWyFRQ54YLXrhcs8YkPqexUvo6-8y_FSaAVLZTBAxgRJyfyJmkHU_XtboIwuG6xprhiQl9xn2FXkpi41Y0DUq7nNU/?a=web&c=72&f=small_town_boy.mp3&special=1617478235-s9coL3BX6o9WBKgaxaZf6upK89ytW4oVqSGzPyFIsZY%3D'; | |
let audio = new Audio(audio_url); | |
document.getElementsByClassName('msg-thread')[0].addEventListener("DOMSubtreeModified", function() { | |
if( typeof play_audio_trigger !== 'undefined'){ | |
clearTimeout(play_audio_trigger); | |
} | |
play_audio_trigger = setTimeout(function(){ | |
play_audo(); |
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
// From: http://stackoverflow.com/questions/3596583/javascript-detect-an-ajax-event | |
var s_ajaxListener = new Object(); | |
s_ajaxListener.tempOpen = XMLHttpRequest.prototype.open; | |
s_ajaxListener.tempSend = XMLHttpRequest.prototype.send; | |
s_ajaxListener.callback = function () { | |
// this.method :the ajax method used | |
// this.url :the url of the requested script (including query string, if any) (urlencoded) | |
// this.data :the data sent, if any ex: foo=bar&a=b (urlencoded) | |
console.log(this.method); |
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
<script> | |
$(function () { | |
function getLocation() { | |
if (navigator.geolocation) { | |
navigator.geolocation.getCurrentPosition(fetchPosition); | |
} else { | |
$('.wether-section').hide(); | |
console.log("Geolocation is not supported by this browser."); | |
} | |
} |