Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace Tlk
{
class TlkFile
{
@Citillara
Citillara / WindowsAppKeys.md
Created November 28, 2018 16:24
List of media keys to override in Windows registry

Registry location

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\xx

Where xx is the key

Example configs

Strings

"Association"="http"

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization.Json;
using System.Net;
using System.Net.Cache;
using System.Runtime.Serialization;
using System.IO;
/// <summary>
/// Provides a convention for fixing the independent association (IA) foreign key column names. (prevents EF from adding _Id)
/// </summary>
public class ForeignKeyNamingConvention : IStoreModelConvention<AssociationType>
{
public void Apply(AssociationType association, DbModel model)
{
The different types of bugs :
- Bohrbug (plain and simple, like Bohr's atomic model)
- Heisenbug (dissapears or alters its behaviour if you try to debug it)
- Schroedingbug (code that should have never worked but did - until you looked at it)
- Mandelbug (cause too hard to understand, bug appears chaotic)
if WScript.Arguments.Count = 0 then
WScript.Echo "Missing parameters"
else
Set xmlDoc = _
CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = "False"
xmlDoc.Load(WScript.Arguments(0))
Select Case xmlDoc.parseError.errorCode
function OnEvent(event, arg)
if event == "G_PRESSED" then -- this is for when the G key is pressed
if arg == 1 then -- 1 is the G key number tested
toggle = not toggle -- This changes the toggle state back and forth
if toggle then
OutputLCDMessage("Pressed", 2000)
PressKey("lshift")
PressKey("w")
else
OutputLCDMessage("No pressed", 2000)
@Citillara
Citillara / _readme.txt
Created November 22, 2015 15:15 — forked from neckcen/_readme.txt
Windows 7 updates to remove to prevent telemetry collection. Disables automatic upgrade to Windows 10
1) Download as ZIP
2) Run telemetry_win10_removal.bat as administrator
3) Reboot
4) Check for and install updates
@Citillara
Citillara / kb-uninstall.bat
Last active January 17, 2024 12:26
Windows 7 updates to remove to prevent telemetry collection. Disables automatic upgrade to Windows 10
:: Removes most telemetry/data collection/potentially unwanted behavior from Windows 7
:: Disables the automatic download of Windows 10
:: Note : be careful to keep KB in descending order
:: Comment that line to restore prompts for uninstall/reboot
:: Thanks to https://gist.github.com/geoffroyjabouley
set WUSA_OPTIONS=/quiet /norestart
:: Removes Windows 7-8.1 telemetry (part 1)
wusa %WUSA_OPTIONS% /uninstall /kb:3080149
@Citillara
Citillara / jpeg-converter.cs
Last active August 31, 2015 08:33
Simple JPEG converter
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace JPGConverter
{