This file contains hidden or 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
REM Run this file as Administrator | |
REM Python | |
reg add HKLM\SOFTWARE\Classes\.py /v PerceivedType /t REG_SZ /d text /f | |
REM Lua | |
reg add HKLM\SOFTWARE\Classes\.lua /v PerceivedType /t REG_SZ /d text /f | |
REM node.js/npm | |
reg add HKLM\SOFTWARE\Classes\.npmignore /v PerceivedType /t REG_SZ /d text /f |
This file contains hidden or 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 SAS EuroBonus Online Shopping - Sort by points descending | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1.3 | |
// @description Sorting the points | |
// @author niikoo | |
// @match https://onlineshopping.flysas.com/* | |
// @icon https://icons.duckduckgo.com/ip2/flysas.com.ico | |
// @updateURL https://gist.github.com/niikoo/0a86f8cd0b71c971f2284f04cf75a3f2/raw/sas-eurobonus-online-shopping-pointsort.user.js | |
// @downloadURL https://gist.github.com/niikoo/0a86f8cd0b71c971f2284f04cf75a3f2/raw/sas-eurobonus-online-shopping-pointsort.user.js |
This file contains hidden or 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 hidden or 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 hidden or 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.4.0 | |
// @author niikoo | |
// @match https://tjenester.skatteetaten.no/personsok | |
// @match https://skatt.skatteetaten.no/web/skattelistesoek* | |
// @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 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 ;; |