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
/* | |
Blog - https://codeeshop.medium.com/how-to-select-multiple-tables-in-adminer-php-using-javascript-dcdb0eb3bf44 | |
Youtube Video - https://youtu.be/yF3WIENZVOY | |
*/ | |
if ($('#jquerycdn') == null || !$('#jquerycdn').length) { | |
var s = document.createElement("script"); | |
s.type = "text/javascript"; | |
s.id = "jquerycdn"; | |
s.src = "https://code.jquery.com/jquery-2.2.4.min.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 getRandomDates(numDates) { | |
const twoYearsAgo = new Date(); | |
twoYearsAgo.setFullYear(twoYearsAgo.getFullYear() - 2); | |
const today = new Date(); | |
const dates = []; | |
for (let i = 0; i < numDates; i++) { | |
// Get random milliseconds between two years ago and today | |
const randomTime = twoYearsAgo.getTime() + Math.random() * (today.getTime() - twoYearsAgo.getTime()); | |
const randomDate = new Date(randomTime); |
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 elems = document.querySelectorAll('#download-row0 [type="checkbox"]') | |
for (let i = 0; i < elems.length; i++) { | |
if (elems[i].checked) { | |
elems[i].click() | |
} | |
console.log(elems[i].parentElement.innerText) | |
const value = elems[i].parentElement.innerText | |
const trim_value = value.substr(0,2) | |
if(!['1.'].includes(trim_value)) { |
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
ffmpeg -i TO_CONVERT_FILE -c copy -an TO_NEW_BUILD_FILE |
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
ffmpeg -i TO_CONVERT_VIDEO_FILE -i /home/anantnegi/Videos/logo_60.png -filter_complex \ | |
"[0:v][1:v]overlay=15:15:enable='if(between(mod(t,10),0,2),8)'[top-left]; \ | |
[top-left][1:v]overlay=main_w-overlay_w-15:main_h-overlay_h-15:enable='if(between(mod(t,10),2,4),8)'[bottom-right]; \ | |
[bottom-right][1:v]overlay=main_w-overlay_w-15:15:enable='if(between(mod(t,10),4,6),8)'[top-right]; \ | |
[top-right][1:v]overlay=15:main_h-overlay_h-15:enable='if(between(mod(t,10),6,8),8)'[bottom-left]" -map "[bottom-left]" NEW_VIDEO_FILE_BUILD_FILE -y |
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
read -p "Enter your [Branch/repo]: " branch_repo | |
branch_repo=${branchrepo:-"DEFAULT_REPO_NAME"} | |
# To Get workflow IDs with status "disabled_manually" add | contains("disabled_manually") | |
workflow_ids=($(gh api repos/$branch_repo/actions/workflows | jq '.workflows[] | select(.["state"]) | .id')) | |
for workflow_id in "${workflow_ids[@]}" | |
do | |
echo "Listing runs for the workflow ID $workflow_id" | |
run_ids=( $(gh api repos/$branch_repo/actions/workflows/$workflow_id/runs --paginate | jq '.workflow_runs[].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
// January 20, 2023 | |
const datas = { | |
"data": { | |
"search": { | |
"userCount": 245, | |
"pageInfo": { | |
"endCursor": "Y3Vyc29yOjUw", | |
"hasNextPage": true | |
}, |
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 getDateInFormat = function (dated) { | |
let dd = String(dated.getDate()).padStart(2, '0'); | |
let mm = String(dated.getMonth() + 1).padStart(2, '0'); //January is 0! | |
let yyyy = dated.getFullYear(); | |
return dated = yyyy + '-' + mm + '-' + dd; | |
} | |
let addDays = function (date, addDays) { |
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 isRtlText = require('is-rtl-text') | |
const Texts = ['کھ', '#sssssss w مهسا_امینی', 'A @@#', 'تھ', 'العربية', '𐬨𐬀𐬰𐬛𐬂'] | |
for (let i = Texts.length - 1; i >= 0; i--) { | |
console.log(isRtlText(Texts[i]), Texts[i], 'Texts[i]') | |
} |
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
// Goto Chrome History - chrome://history/ | |
// Open and Run this in console | |
document.querySelector('history-app').$.history.selectAllItems() | |
document.querySelector('history-app').$.history.deleteSelected_() |
NewerOlder