Skip to content

Instantly share code, notes, and snippets.

View Mehmet-Erkan's full-sized avatar
💭
In code we trust

Mehmet Erkan Mehmet-Erkan

💭
In code we trust
  • CODE42 GmbH
  • Switzerland
  • 17:25 (UTC +01:00)
View GitHub Profile
@Mehmet-Erkan
Mehmet-Erkan / obsidian-web-clipper.js
Created August 12, 2024 15:06 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@Mehmet-Erkan
Mehmet-Erkan / New Terminal Settings
Created May 25, 2020 11:08
My personal settings for the Windows 10 New Terminal App
// This file was initially generated by Windows Terminal 0.11.1333.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@Mehmet-Erkan
Mehmet-Erkan / Get-StringMatch
Created March 31, 2020 14:41
PowerShell Cmdlet to search file directory to find patterns with regex
<#
.Synopsis
Find by Regex
.DESCRIPTION
Find patterns with regex within a file directory
.EXAMPLE
$pattern = @()
$pattern += '<h1>(.*?)</h1>'
Get-StringMatch -Path "C:\Temp\myCode\" -Patterns $pattern
@Mehmet-Erkan
Mehmet-Erkan / PyPDF2-Reader.py
Created November 13, 2019 10:23
Python PyPDF2 match string from pdf document
def find_match(pdfdoc, annotation: str) -> []:
results = []
# extract text and do the search
for i in range(0, NumPages):
match = {}
pages = pdfdoc.getPage(i)
text = pages.extractText()
res_search = re.search(annotation, text)
(resolve-path "$env:LOCALAPPDATA\Microsoft_Corporation\powershell_ise*").Path
@Mehmet-Erkan
Mehmet-Erkan / SPCompareListValue.ps1
Created March 20, 2018 15:24
SharePoint compare list values with PowerShell
$mSite = Get-SPweb "http://sharepointed.com/site/taco"
$aList = $mSite.lists["A"]
$bList = $mSite.lists["B"]
$arrA = @()
$arrB = @()
foreach($iA in $aList.Items)
{
$arrA += $iA["Title"]
@Mehmet-Erkan
Mehmet-Erkan / FilterArray.ts
Created March 15, 2018 14:08
Filter an array by keyword
performFilter(filterBy: string) : IProduct[] {
filterBy = filterBy.toLocaleLowerCase();
return this.products.filter((product: IProduct) =>
product.productName.toLocaleLowerCase().indexOf(filterBy) != -1);
}
@Mehmet-Erkan
Mehmet-Erkan / CSSJSLink.js
Last active March 15, 2018 13:55
CSS JSLink
@Mehmet-Erkan
Mehmet-Erkan / ProxyAuth.ps1
Created January 24, 2017 13:14
Proxy Authentication
$browser = New-Object System.Net.WebClient
$browser.Proxy.Credentials =[System.Net.CredentialCache]::DefaultNetworkCredentials