Skip to content

Instantly share code, notes, and snippets.

@jammerxd
jammerxd / us-news-blocklist-adguard-home.csv
Created June 4, 2024 23:00
Blocklist of US News Domains
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
||domain^
||10nbc.com^
||10news.com^
||11alive.com^
||12news.com^
||13abc.com^
||13wmaz.com^
||14news.com^
||14wfie.com^
||27east.com^
@jammerxd
jammerxd / websocket_server_async.cpp
Last active January 9, 2023 02:52
Boost Beast Websocket Server Async with any_io_executor - FAILING
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//
//------------------------------------------------------------------------------
@jammerxd
jammerxd / Controls.Expander.xaml
Last active March 10, 2016 16:40
Mahapps.Metro Animated Expander Mod
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
xmlns:Converters="clr-namespace:MahApps.Metro.Converters">
<!--THIS IS THE BEGINNING OF TRANSITIONS FOR THE EXPANDER-->
<!--<Storyboard x:Key="UpTransitionEnter">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="ExpandSite"
Storyboard.TargetProperty="(UIElement.Opacity)">
@jammerxd
jammerxd / Controls.Expander.xaml
Created March 9, 2016 08:19
Modified Behaviour
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls"
xmlns:Behaviours="clr-namespace:MahApps.Metro.Behaviours"
xmlns:Converters="clr-namespace:MahApps.Metro.Converters">
<Converters:ThicknessBindingConverter x:Key="ThicknessBindingConverter" />
<Style x:Key="ExpanderBaseHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Background" Value="Transparent" />
#region ChangeTheme
public void ChangeTheme(string theme)
{
App.Current.Dispatcher.Invoke(() => {
var tempTheme = ThemeManager.DetectAppStyle(Application.Current);
var appTheme = ThemeManager.GetAppTheme(theme);
ThemeManager.ChangeAppStyle(Application.Current, tempTheme.Item2, appTheme);
});
}
#endregion
<mahapps:MetroWindow.Resources>
<Ellipse x:Key="AppThemeMenuIcon"
x:Shared="False"
Width="16"
Height="16"
StrokeThickness="1"
Stroke="{Binding BorderColorBrush, Mode=OneWay}"
Fill="{Binding ColorBrush, Mode=OneWay}" />
<Ellipse x:Key="AccentMenuIcon"
x:Shared="False"
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Data;