Skip to content

Instantly share code, notes, and snippets.

@mediabuff
mediabuff / minimize-and-float-video-on-scroll.css
Created April 15, 2024 18:09 — forked from ts-toh/minimize-and-float-video-on-scroll.css
JW Player Demo: Minimize and Float Video on Scroll
.player-container {
background-color: black;
}
.player-minimize .player-position {
background-color: white;
border-radius: 2px;
bottom: 20px;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.25);
left: 20px;
@mediabuff
mediabuff / star-wars-planets.html
Created September 20, 2023 18:03 — forked from richard-flosi/star-wars-planets.html
Web Component using Custom Element, Shadow DOM, fetch, async/await, and the Star Wars API
<html>
<head>
<script>
customElements.define("star-wars-planets", class extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: "open" });
}
static get observedAttributes() { return ["loading", "planets"]; }
@mediabuff
mediabuff / Windows Defender Exclusions VS 2017.ps1
Created February 5, 2021 03:37
Adds Windows Defender exclusions for Visual Studio 2019
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null
$pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null
$pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio') > $null
@mediabuff
mediabuff / README.md
Created August 15, 2019 15:18 — forked from dconnolly/README.md
All 100 Chromecast background images that are rotated through, linked to their original locations on Google hosting. Links to 2560 width versions, where available.
using System;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Interop;
using Walterlv.Demo.Interop.Native;
namespace Walterlv.Demo.Interop
{
public class WindowBlur
{
@mediabuff
mediabuff / direct3d11.interop.h
Created November 4, 2017 15:34 — forked from kennykerr/direct3d11.interop.h
Alternative to the Windows SDK's <windows.graphics.directx.direct3d11.interop.h> that works well with C++/WinRT.
#include <winrt/windows.graphics.directx.direct3d11.h>
extern "C"
{
HRESULT __stdcall CreateDirect3D11DeviceFromDXGIDevice(::IDXGIDevice* dxgiDevice,
::IInspectable** graphicsDevice);
HRESULT __stdcall CreateDirect3D11SurfaceFromDXGISurface(::IDXGISurface* dgxiSurface,
::IInspectable** graphicsSurface);
}
@mediabuff
mediabuff / main.cpp
Created July 19, 2017 07:42 — forked from fincs/main.cpp
Fully native C++ WinRT (Metro-style) app
//
// Fully native C++ WinRT application example
// Programmed by fincs
//
#include <windows.h>
#include <roapi.h>
#include <wchar.h>
#include <stdio.h>
#include <stdlib.h>
@mediabuff
mediabuff / RedirectingHandler.cs
Created February 13, 2017 00:02 — forked from joelverhagen/RedirectingHandler.cs
RedirectingHandler
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace Knapcode.Http.Handlers
{