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
SELECT | |
fk.name 'Foreign Key Name', | |
tp.name 'Parent table', | |
cp.name 'Parent colName', | |
cp.column_id 'Parent colId', | |
tr.name 'Refrenced table', | |
cr.name 'Referenced colName', | |
cr.column_id 'Referenced colId' | |
FROM sys.foreign_keys fk | |
INNER JOIN sys.tables tp ON fk.parent_object_id = tp.object_id |
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
// ==UserScript== | |
// @name Trello fix "Redirecting" | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1.2 | |
// @description Fix the annoying "Redirecting" box that trello puts up if the url needs auth. | |
// @author niikoo | |
// @match https://trello.com/c/* | |
// @updateURL https://gist.github.com/niikoo/78f4ea602d9e596745dc929aebfec399/raw/trello-description-redirectingBox-fix.user.js | |
// @downloadURL https://gist.github.com/niikoo/78f4ea602d9e596745dc929aebfec399/raw/trello-description-redirectingBox-fix.user.js | |
// @icon https://www.google.com/s2/favicons?domain=trello.com |
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
// ==UserScript== | |
// @name Prevent clicking search results in "Skattelisten". | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3.3 | |
// @author niikoo | |
// @match https://tjenester.skatteetaten.no/personsok | |
// @grant none | |
// @downloadURL https://gist.github.com/niikoo/5948a7d0a2d1bee2f0cfc1321ee6e7d9/raw/skattelisten.clickdrop.user.js | |
// @updateURL https://gist.github.com/niikoo/5948a7d0a2d1bee2f0cfc1321ee6e7d9/raw/skattelisten.clickdrop.user.js | |
// @icon https://icons.duckduckgo.com/ip2/skatteetaten.no.ico |
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
using System; | |
using System.Reflection; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Converters; | |
namespace Faktum.Ics.Library.Utilities.Json | |
{ | |
/// <inheritdoc /> | |
/// <summary> | |
/// Defaults enum to the default value (first element). Can be overridden by setting an int as default value. |
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
public static class EnumExtensions | |
{ | |
public static string GetEnumMemberValue<T>(this T type) | |
where T : Enum | |
{ | |
var enumType = typeof(T); | |
var name = Enum.GetName(enumType, type); | |
var enumMemberAttribute = ((EnumMemberAttribute[])enumType.GetField(name).GetCustomAttributes(typeof(EnumMemberAttribute), true)).Single(); | |
return enumMemberAttribute.Value; | |
} |
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
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | |
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
$dialog = New-Object -TypeName System.Windows.Forms.OpenFileDialog | |
$dialog.AddExtension = $true | |
$dialog.Filter = 'PowerShell-Script (*.ps1)|*.ps1' | |
$dialog.Multiselect = $true | |
$dialog.FilterIndex = 0 | |
$dialog.InitialDirectory = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PSScriptRoot, "..")) |
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
# OpenWRT nvram-clean.sh for Linksys wrt54gl | |
# | |
# Usage: https://openwrt.org/toh/linksys/wrt54g | |
# | |
# Source: https://web.archive.org/web/20140326172212/http://downloads.openwrt.org/people/nbd/nvram-clean.sh | |
# Version: 1.0 | |
empty() { | |
case "$1" in | |
"") return 0 ;; |
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
// allows using all Jquery AJAX methods in Greasemonkey | |
// inspired from http://ryangreenberg.com/archives/2010/03/greasemonkey_jquery.php | |
// works with JQuery 1.5 | |
// (c) 2011 Martin Monperrus | |
// (c) 2010 Ryan Greenberg | |
// | |
// Usage: | |
// $.ajax({ | |
// url: '/p/', | |
// xhr: function(){return new GM_XHR();}, |
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
// ==UserScript== | |
// @name IMDb Utility Library (API) | |
// @namespace driver8.net | |
// @version 0.1.1 | |
// @description Utility library for the Internet Movie Database. Provides an API for grabbing info from IMDb.com | |
// @author driver8 | |
// @match *://*.imdb.com/* | |
// @grant GM_xmlhttpRequest | |
// @connect imdb.com | |
// ==/UserScript== |