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
# We assume that the driver is installed via the MSI. | |
[string] $mongoDriverPath; | |
# Check to see if we are running the 64 bit version of Powershell. | |
# See http://stackoverflow.com/questions/2897569/visual-studio-deployment-project-error-when-writing-to-registry | |
if ([intptr]::size -eq 8) { | |
$mongoDriverPath = (Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v3.5\AssemblyFoldersEx\MongoDB CSharpDriver 1.0").'(default)'; | |
} | |
else { | |
$mongoDriverPath = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\.NETFramework\v3.5\AssemblyFoldersEx\MongoDB CSharpDriver 1.0").'(default)'; |
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
-- Search all varchar columns in an entire database for a specific value | |
-- DANGER: do not use on large databases. 10k rows **should** be fine, larger than that requires caution. | |
-- Run this script in a temp database. It needs access to the target database and information_schema to run. | |
-- Results will go into a temporary table called rset. Everything will be cleaned up once you disconnect. | |
-- BEGIN SCRIPT -- | |
-- Variables. Modify these, the rest of the script will do the work for you. |
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 sys, socket, os, urlparse, re, time, copy, urllib2, threading, traceback | |
from urllib import url2pathname, quote | |
from httplib import responses | |
from base64 import b64decode | |
from calibre import browser, relpath, unicode_path, fit_image | |
from calibre.constants import filesystem_encoding, iswindows | |
from calibre.utils.filenames import ascii_filename | |
from calibre.ebooks.BeautifulSoup import BeautifulSoup, Tag | |
from calibre.ebooks.chardet import xml_to_unicode |
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
#!/bin/sh | |
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <[email protected]> | |
# | |
# SPDX-License-Identifier: MIT | |
arch=$(dpkg --print-architecture) | |
echo "Detected architecture: $arch" | |
case "$arch" in |