Skip to content

Instantly share code, notes, and snippets.

View darkmuck's full-sized avatar

William DiStefano darkmuck

View GitHub Profile
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@darkmuck
darkmuck / mfp
Created January 10, 2017 14:56 — forked from josefnpat/mfp
Download all MusicForProgramming(); tracks, if they aren't already downloaded. dep: php & wget
#!/usr/bin/php
<?php
$xml = simplexml_load_file('http://musicforprogramming.net/rss.php');
$songs = array();
foreach($xml->channel->item as $item){
$songs[] = (string)$item->comments;
}
@darkmuck
darkmuck / notepad.html
Created September 19, 2016 18:42 — forked from jdkanani/notepad.html
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
DECLARE @SearchStr NVARCHAR(100) = 'string to search for'
CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))
DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)
SET @TableName = ''
SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')
WHILE @TableName IS NOT NULL
BEGIN
SET @ColumnName = ''
SET @TableName =
(SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))
@darkmuck
darkmuck / gist:2e13ff7312a871de03a60517a85b8b72
Created May 17, 2016 17:11 — forked from jpoehls/gist:2030795
Using CTRL+W to close tabs in Visual Studio

In Tools | Options | Keyboard...

  1. Add CTRL+W as a Global shortcut for Window.CloseDocumentWindow
  2. Remove the CTRL+W shortcut for Edit.SelectCurrentWord

The caveat to this is if you are used to using CTRL+W to select the current word. If you do, find another shortcut that works for that.

@darkmuck
darkmuck / gv-delete.user.js
Created February 16, 2016 15:22
Userscript to delete all Google Voice history and empty trash
// ==UserScript==
// @name Google Voice Delete History
// @description Deletes all Google Voice history
// @version 1.1.0
// @license MIT
// @namespace gavinhungry.io
// @author Gavin Lloyd <[email protected]>
//
// @include https://www.google.tld/voice
// @include https://www.google.tld/voice/*
<UserSettings>
<ApplicationIdentity version="10.0"/>
<ToolsOptions>
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"/>
</ToolsOptions>
<Category name="Environment_Group" RegisteredName="Environment_Group">
<Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package">
<PropertyValue name="Version">2</PropertyValue>
<FontsAndColors Version="2.0">
<Categories>
In SSRS to support a dynamic font size based on a parameter use an expression like this:
=IIF(Parameters!UseLargeFont.Value="1","14Pt","12pt")
/* Vedant Misra (vedantmisra.com) (github.com/vedant)
*
* Script for exporting Google Keep note files.
*
* This does not handle attachments or checklists, only note files. Downloads
* each note to a .txt file named for the note's title.
*
* To use this, go to https://drive.google.com/keep/ and wait for the page to
* fully load all of your saved notes; scroll to the bottom to confirm they're
* loaded. Then paste the below in your URL bar and hit enter.
@darkmuck
darkmuck / gist:6104033
Created July 29, 2013 12:40
ldapadd ldap-init
ldapadd -x -D "cn=Manager,dc=openiam,dc=com" -W -f /tmp/ldap-init.ldif