Skip to content

Instantly share code, notes, and snippets.

View TheFanatr's full-sized avatar

Yan TheFanatr

  • \Device\HardDisk1
View GitHub Profile
@PlumpUnity
PlumpUnity / GameHost.cs
Created October 10, 2017 08:31 — forked from Vanlalhriata/GameHost.cs
Host Unity game in WPF
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Interop;
namespace KinectRun.Host.Controls
{
// GameHost is a FrameworkElement and can be added to controls like so:
// var gameHost = new GameHost(container.ActualWidth, container.ActualHeight);
@Guerra24
Guerra24 / WinEffects.java
Last active May 7, 2024 16:19
Window Frame Effects for Windows (Transparency/Blur Behind/Client side decorations) in Java.
// START WIN7
// MARGINS class for WIN7 Frame
public class MARGINS extends Structure implements Structure.ByReference {
public int cxLeftWidth;
public int cxRightWidth;
public int cyTopHeight;
public int cyBottomHeight;
@Override
using System;
using System.Runtime.InteropServices;
namespace TranslucentTB
{
class Program
{
[DllImport("user32.dll")]
internal static extern IntPtr SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);
[DllImport("user32.dll")]
#include <windows.h>
void SetWindowBlur(HWND hWnd)
{
const HINSTANCE hModule = LoadLibrary(TEXT("user32.dll"));
if (hModule)
{
@haneytron
haneytron / BloomFilter.cs
Last active November 14, 2023 06:13
A simple Bloom Filter implementation in C#
using System;
namespace BloomFilter
{
class Program
{
static void Main(string[] args)
{
AddItem("test");
AddItem("test2");
@Vanlalhriata
Vanlalhriata / GameHost.cs
Created August 23, 2016 14:39
Host Unity game in WPF
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Interop;
namespace KinectRun.Host.Controls
{
// GameHost is a FrameworkElement and can be added to controls like so:
// var gameHost = new GameHost(container.ActualWidth, container.ActualHeight);
@ValCanBuild
ValCanBuild / Podfile
Created March 3, 2016 11:39
Using variables in your Podfile
platform :ios, '9.0'
use_frameworks!
$rxVersion = '~> 2.2.0'
target 'MyProject' do
pod 'RxSwift', $rxVersion
pod 'RxCocoa', $rxVersion
end
@Restuta
Restuta / framework-sizes.md
Last active June 11, 2025 03:17
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@need12648430
need12648430 / name.js
Last active December 30, 2022 17:45
Pronounceable Seeded Name Generator
function name (id, l) {
function n(){return id=(399*id)%509}
var r="BDGKNPTVZ"[n()%9]
for (var i=1;i<l;i++) r+=i%2?"aeiou"[n()%5]:"bdgknptvz"[n()%9]
return r
};
// id=seed, l=length
function name (id, l) {
// lcg prng
@sailro
sailro / ProjectFileHook.cs
Created October 2, 2014 08:09
Fix an assembly reference in a Visual Studio Tools for Unity project
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UnityEditor;
using SyntaxTree.VisualStudio.Unity.Bridge;
using UnityEngine;
[InitializeOnLoad]