Skip to content

Instantly share code, notes, and snippets.

@SanderTheDragon
SanderTheDragon / postman-deb.sh
Last active October 20, 2024 16:20
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <[email protected]>
#
# SPDX-License-Identifier: MIT
arch=$(dpkg --print-architecture)
echo "Detected architecture: $arch"
case "$arch" in
@and-rom
and-rom / ch.recipe
Created February 20, 2015 14:25
calibre habrahabr recipe
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
@dwurf
dwurf / dbscan.sql
Created May 2, 2012 15:08
MySQL hacks:
-- 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.
@zippy1981
zippy1981 / MongoTest.ps1
Created March 4, 2011 16:27
Example of using the 10gen MongoDB CSharp driver in powershell.
# 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)';