Skip to content

Instantly share code, notes, and snippets.

View neslekkim's full-sized avatar

Asbjørn Mikkelsen neslekkim

View GitHub Profile
@neslekkim
neslekkim / gist:1064916
Created July 5, 2011 14:20
stacktrace when using Func
at Database.<ExecuteReader>b__0[T](IDbCommand cmd) in C:\...\Database.cs:line 25
at Database.Execute[T,TResult](String spName, Func`2 configure, Func`2 execute, Func`2 map) in C:\...\Database.cs:line 61
at Database.ExecuteReader[T](String spName, Func`2 configure, Func`2 map) in C:\...\Database.cs:line 25
@neslekkim
neslekkim / gist:1380368
Created November 20, 2011 15:35
nettverk problemer
Trace kjørt fra Telenor ADSL (trondheim)
Tracing route to infoq.com [63.246.7.184]
over a maximum of 30 hops:
1 1 ms <1 ms <1 ms 10.0.0.138
2 8 ms 8 ms 7 ms ti0019a380-l100.ti.telenor.net [148.122.176.171]
3 7 ms 7 ms 10 ms ti0019d320-ge0-1-0-10.ti.telenor.net [146.172.9.197]
4 57 ms 56 ms 56 ms ti0006c300-ge1-2-0.ti.telenor.net [146.172.99.221]
5 79 ms 58 ms 57 ms ti0002c310-as0-0.ti.telenor.net [146.172.98.130]
@neslekkim
neslekkim / gist:6579435
Last active December 23, 2015 04:19
Trouble reading AD.
This code works for all users belonging to domain admins, but not normal users, and this is for only one of our customers, so far.
WindowsIdentity user = WindowsIdentity.GetCurrent();
string username = user.Name;
using (PrincipalContext context = new PrincipalContext(ContextType.Domain))
{
UserPrincipal user = UserPrincipal.FindByIdentity(context, username); <-- gives exception:
System.Runtime.InteropServices.COMException (0x8007200A): Det angitte attributtet eller verdien for katalogtjenesten finnes ikke.
@neslekkim
neslekkim / gist:8645457
Created January 27, 2014 09:16
FAQ: NavSpark GPS / GNSS
Copied from : http://pastebin.com/1f5iXwiT
FAQ for NavSpark
=========================
Arduino Compatible with GPS GNSS Receiver
Packing 32bit Features and GPS GNSS into 8bit Size and Price
http://www.indiegogo.com/projects/navspark-arduino-compatible-with-gps-gnss-receiver/x/6094574
=========================
NavSpark FAQ:
@neslekkim
neslekkim / monitorissues
Last active November 14, 2023 21:16
When all Windows are resized after your monitor have been power-recycled
Some monitors (especially hdmi/TV monitors) don't keep the hdmi port "alive" when they are powered down.
As a result, when windows reboots or comes out of sleep, it can't detect a monitor, so it sets resolution to it's "SIMULATED" monitor registry entry in the key at;
HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration
This can be manually edited to contain the actual screen registration of your default monitor.
Change these keys:
Under each is a tree called "00" two of the keys are
PrimSurfSize.cx