Skip to content

Instantly share code, notes, and snippets.

import wx
class CustomFrame(wx.Frame):
def __init__(self, parent, title, image_dimensions):
super(CustomFrame, self).__init__(parent, title=title, style=wx.NO_BORDER)
self.SetBackgroundColour(wx.Colour(255, 255, 255)) # Set background color
# Load custom window images
self.SetIcon(wx.Icon("window_icon.ico", wx.BITMAP_TYPE_ICO))
self.frame_images = {}
@alamsal
alamsal / PasswordHelper.cs
Created August 10, 2016 18:35
Databind the Password Property of a WPF PasswordBox
public static class PasswordHelper
{
public static readonly DependencyProperty PasswordProperty =
DependencyProperty.RegisterAttached("Password",
typeof(string), typeof(PasswordHelper),
new FrameworkPropertyMetadata(string.Empty, OnPasswordPropertyChanged));
public static readonly DependencyProperty AttachProperty =
DependencyProperty.RegisterAttached("Attach",
typeof(bool), typeof(PasswordHelper), new PropertyMetadata(false, Attach));

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

import wx
class CustomFrame(wx.Frame):
def __init__(self, parent, title, image_dimensions):
super(CustomFrame, self).__init__(parent, title=title, style=wx.NO_BORDER)
self.SetBackgroundColour(wx.Colour(255, 255, 255)) # Set background color
# Load custom window images
self.SetIcon(wx.Icon("window_icon.ico", wx.BITMAP_TYPE_ICO))
self.frame_images = {}
@shiritrong
shiritrong / gist:d85bb1e16c66d1a09896727780b4fc7c
Last active May 4, 2024 23:19
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
=================================================================================
. Run "Command Prompt" as Administrator
. slmgr.vbs -ipk Product Key
. slui4
=================================================================================
Windows 7 Ultimate Retail Phone Activation Keys
RHTBY-VWY6D-QJRJ9-JGQ3X-Q2289
V77DJ-CT8WB-Y3GXT-X3FBP-6F987
JC7BV-94FD2-D86PH-XRMHR-BXKDG
@niraami
niraami / monitorctl.py
Last active May 4, 2024 23:18
Hyprland monitor enable/disable control script
#!/usr/bin/env python3
import sys
import json
import typing
import argparse
import subprocess
import tempfile
from enum import Enum
@nandorojo
nandorojo / npm-rename.md
Last active May 4, 2024 23:15
How to rename an NPM package in your `package.json`

Add the package name you want to your package.json dependencies, and then make the value npm:<actual-package-name>. You can also add a version to the end.

package.json

{
  "dependencies": {
    "moti18": "npm:moti@0.18.0"
  }
}
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 4, 2024 23:05
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@madduci
madduci / ftth_openwrt.md
Last active May 4, 2024 23:05
Deutsche Telekom FTTH Access with OpenWRT

Configuring Deutsche Telekom FTTH Access with OpenWRT

After looking for alternatves to the suggested Router from Telekom (AVM FritzBox and HUawei Speedport), I've discovered the possibility of configuring my existing OpenWRT Router to act as gateway to the Telekom FTTH (Fiber To The Home) Magenta Zuhause package.

TL;DR

The WAN interface must be configured as follows (see your Telekom letter):

  • Protocol: PPPoE
  • PAP/CHAP username:
@addyosmani
addyosmani / preprocessing.md
Last active May 4, 2024 23:04
JavaScript preprocessing/precompilation

Problem: How can we preprocess JavaScript (at build-time or on the server-side) so engines like V8 don't have to spend as much time in Parse? This is a topic that involves generating either bytecode or a bytecode-like-abstraction that an engine would need to accept. For folks that don't know, modern web apps typically spend a lot longer in Parsing & Compiling JS than you may think.

  • Yoav: This can particularly be an issue on mobile. Same files getting parsed all the time for users. Theoretically if we moved the parsing work to the server-side, we would have to worry about it less.
  • One angle to this problem is we all ship too much JavaScript. That's one perspective. We could also look at preprocessing.
  • We've been talking about this topic over the last few weeks a bit with V8. There were three main options proposed.
    1. Similar to what optimize-js does. Identify IIFEs and mark them as such so the browser and VMs heuristics will catch them and do a better job than today. optimize-js only tackles IIFE bu