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
import os | |
import openpyxl | |
import re | |
def search_string_in_files(directory, search_string, excel_file): | |
# Create a new Excel workbook | |
wb = openpyxl.Workbook() | |
sheet = wb.active | |
sheet.title = "Search Results" | |
sheet['A1'] = "File Name" |
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
import pandas as pd | |
import matplotlib.pyplot as plt | |
from matplotlib.dates import DateFormatter | |
import mplcursors | |
# Sample data | |
data = { | |
'Date': ['1-Apr-2024', '1-Apr-2024', '1-Apr-2024', '4-Apr-2024', '5-Apr-2024', '6-Apr-2024'], | |
'Job': ['FOO', 'FOO', 'FOO', 'FOO', 'FOO', 'FOO'], | |
'Start': ['1-Apr-2024 13:12:24', '1-Apr-2024 15:23:44', '1-Apr-2024 23:12:52', |
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
javascript:!function(){document.querySelectorAll(".header,.title,.tc,.gg_728,.sub-btn,.backToTop,.backToTop ~ *").forEach((e=>e.parentNode.removeChild(e)));const e=e=>{const t=document.querySelector("#mangaFile");t.style.width&&(t.style.width="",t.style.height=window.innerHeight-20+"px",t.style.marginTop="10px")};e(),new MutationObserver((t=>{t.forEach((t=>{t.addedNodes.length&&new MutationObserver(e).observe(t.addedNodes[0],{attributes:!0,attributeFilter:["style"]})}))})).observe(document.querySelector("#mangaFile").parentNode,{subtree:!0,childList:!0})}(); |
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
npm install --save-dev rollup rollup-plugin-node-resolve rollup-plugin-commonjs rollup-plugin-babel @babel/preset-env | |
npm run build |
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
javascript:(function(){window._bak_md=document.onmousedown||function(){};document.onmousedown=function(e){e=e||window.event;t=e.target;if(t.tagName=='SELECT'){p=prompt('Find the text in drop down');if(p){for(i=0;i<t.options.length;i++)if(t.options[i].textContent.indexOf(p)===0){t.selectedIndex=i;break;}}document.onmousedown=window._bak_md;window._bak_md=null;e.preventDefault();e.stopPropagation();}};})(); |
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
$('<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/css/bootstrap-theme.min.css" type="text/css" rel="stylesheet">').appendTo(document.head); | |
$('<link href="https://www.tablefilter.com/tablefilter/style/tablefilter.css" type="text/css" rel="stylesheet">').appendTo(document.head); | |
var s = document.createElement('script'); | |
s.setAttribute('src', 'https://www.tablefilter.com/tablefilter/tablefilter.js'); | |
s.onload = _ => document.querySelectorAll('table').forEach(e => new TableFilter(e).init()); | |
document.body.appendChild(s); |
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
tell application "System Events" to tell process "Citrix Viewer" | |
tell window 2 | |
set position to {100, 100} | |
set size to {1024, 768} | |
end tell | |
end tell | |
osascript -e 'tell application "System Events" to tell window 2 of process "Citrix Viewer" to set { position, size } to { {100, 65}, {1600, 1200} }' |
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 ShellExecuteVB() | |
Dim objShell | |
Set objShell = CreateObject("Shell.Application") | |
Call objShell.ShellExecute("explorer", "c:\your\path\", "c:\your\path\", "", 1) | |
End Function | |
ShellExecuteVB() |
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
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* Write a <code>static String format(String format, Map<String, String> values)</code> to replace | |
* named key to values. E.g. | |
* * <pre> | |
* My name is ${name}. I am ${age} years old. | |
* -> | |
* My name is alice. I am 10 years old. |
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
Option Explicit | |
Public Sub FindDuplicate() | |
Dim i As Long | |
Dim myOlItems As Outlook.Items | |
Dim myOlMailItem1, myOlMailItem2 As Outlook.mailItem | |
Set myOlItems = Application.ActiveExplorer.CurrentFolder.Items | |
myOlItems.Sort "ReceivedTime", True |