Skip to content

Instantly share code, notes, and snippets.

// The bookmarklet you can find online for bugmenot doesn't work. Looks like
// bugmenot now wants just the hostname instead of the full url. Here's one
// that works.
javascript:(function() { var url = ('http://www.bugmenot.com/view/' + escape(location.hostname)); w = open(url, 'w', 'location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=500,height=400,modal=yes,dependent=yes'); if (w) { setTimeout('w.focus()', 1000) } else { location = url } })();
@rubaboo
rubaboo / script.js
Created July 15, 2023 04:39 — forked from jpcaparas/script.js
Tampermonkey: Load an external script and CSS
// ==UserScript==
// @name HackerNews
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://news.ycombinator.com/
// @require https://bennettfeely.com/ztext/js/ztext.min.js
// @resource REMOTE_CSS http://127.0.0.1:8080/style.css
// @grant GM_xmlhttpRequest
/*****************************************************************************
MIT License, http://www.opensource.org/licenses/mit-license.php
Contact: help@sqlworkbooks.com
Copyright (c) 2018 SQL Workbooks LLC
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom
@rubaboo
rubaboo / workflowy x 2.js
Created December 29, 2022 11:26 — forked from davestewart/workflowy x 2.js
WorkFlowy x 2 - a browser bookmarklet to give you a dual panel WorkFlowy view
javascript:
`
WorkFlowy x 2
=============
- A browser Bookmarklet to give you a dual panel WorkFlowy view
Features / Usage:
USE master
GO
IF OBJECT_ID('dbo.sp_SrvPermissions') IS NULL
EXEC sp_executesql N'CREATE PROCEDURE dbo.sp_SrvPermissions AS PRINT ''Stub'';'
GO
/*********************************************************************************************
sp_SrvPermissions V6.1
Kenneth Fisher
http://www.sqlstudies.com
USE master
GO
IF OBJECT_ID('dbo.sp_DBPermissions') IS NULL
EXEC sp_executesql N'CREATE PROCEDURE dbo.sp_DBPermissions AS PRINT ''Stub'';'
GO
/*********************************************************************************************
sp_DBPermissions V6.2
Kenneth Fisher
http://www.sqlstudies.com
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@rubaboo
rubaboo / simplest_alternative_to_sp_MSforeachdb.sql
Created November 9, 2021 02:25 — forked from EitanBlumin/simplest_alternative_to_sp_MSforeachdb.sql
The simplest possible alternative to sp_MSforeachdb
/*
Author: Eitan Blumin | https://eitanblumin.com | https://madeiradata.com
Description:
This is the simplest possible alternative to sp_MSforeachdb which is not too great.
Instructions:
1. Replace the contents of the @Command variable with the command you want to run INSIDE each database.
2. Replace the contents of the @Parameters variable with the parameters you want the command to receive.
3. Add parameters as needed, given @p1 as an example.
4. Change the database filter predicates in the cursor declaration, as needed.
/*********************************************************************************************
sp_AzSQLDBPermissions V1.0
Kenneth Fisher
http://www.sqlstudies.com
This stored procedure returns 3 data sets. The first dataset is the list of database
principals, the second is role membership, and the third is object and database level
permissions.

Master

"Knowledge is powerful, be careful how you use it!"

A collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and more.