Skip to content

Instantly share code, notes, and snippets.

@rubaboo
rubaboo / workflowy-with-image.user.js
Last active February 12, 2019 20:03 — forked from Wizmann/workflowy-with-image.js
[WorkFlowy Inline Images] #forked #Firefox
// ==UserScript==
// @name WorkFlowy Inline Images
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://workflowy.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
@rubaboo
rubaboo / githubpull.md
Created May 16, 2021 06:32 — forked from Jabarabo/githubpull.md
Gist of a stolen gist

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.

/*********************************************************************************************
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.
@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.
  • 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 \" \
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 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
@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:
/*****************************************************************************
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