Skip to content

Instantly share code, notes, and snippets.

View punker76's full-sized avatar
☮️
#PEACE

Jan Karger ツ ☀ punker76

☮️
#PEACE
View GitHub Profile
@flq
flq / NonTopmostPopup.cs
Created April 5, 2011 08:04
WPF: Popup that is only topmost with respect to parent window. Taken from the comments at http://chriscavanagh.wordpress.com/2008/08/13/non-topmost-wpf-popup/ (Joe Gershgorin) which was in not easy to digest state
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Interop;
/// <summary>
/// Popup with code to not be the topmost control
@sukima
sukima / photos_tag.rb
Created May 8, 2012 01:33
Jekyll Plugin for easy FancyBox usage
# Title: Photos tag for Jekyll
# Authors: Devin Weaver
# Description: Allows photos tag to place photos as thumbnails and open in fancybox. Uses a CDN if needed.
#
# ** This only covers the markup. Not the integration of FancyBox **
#
# To see an unabridged explination on integrating this with [FancyBox][1]
# Please read my [blog post about it][2].
#
# [1]: http://fancyapps.com/fancybox/
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@usagirei
usagirei / AeroColorProvider.cs
Created October 15, 2015 21:23
MahApps Metro DWM Colored Accent
/*
* Provides DWM Color as a Bindable Property
* Add the Namespace
* xmlns:dwmAero="clr-namespace:MahApps.Metro.DWMAero"
* And a Resource
* <dwmAero:AeroColorProvider x:Key="AeroColorProvider" />
* Then Bind on the Properties (110%,95%,80%,65%,50% Respectively)
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Highlight}"
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Accent}"
* Color="{Binding Source={StaticResource AeroColorProvider}, Path=Accent2}"
@davidfowl
davidfowl / Example1.cs
Last active June 19, 2024 16:41
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)
@Arlorean
Arlorean / MainWindow.xaml.cs
Created December 17, 2016 16:02
View SVG in WPF Window using SkiaSharp
using System.Windows;
using System.Windows.Controls;
namespace WpfApplication2 {
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
var svg = new SkiaSharp.SKSvg();
var picture = svg.Load("Tiger.svg");
package ys
import groovy.util.logging.Slf4j
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.scheduling.annotation.*
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
import org.springframework.test.context.ContextConfiguration
@thoemmi
thoemmi / Clear-NuGetCache.ps1
Created April 21, 2017 21:11
Script to delete old NuGet packages from %USERPROFILE%\.nuget\packages which haven't been accessed for 150 days
[CmdletBinding(SupportsShouldProcess=$True)]
Param(
[int]$CutoffDays = 150
)
$cutoffDate = (Get-Date).AddDays(-$CutoffDays)
# get path to cached NuGet packages ("%USERPROFILE$\.nuget\packages")
$nugetCachePath = Join-Path "$([System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::UserProfile))" ".nuget\packages"
@franzalex
franzalex / Taskbar.cs
Last active August 6, 2022 18:45
Class to get the taskbar's position, size and other properties.
/******************************************************************************
* Name: Taskbar.cs
* Description: Class to get the taskbar's position, size and other properties.
* Author: Franz Alex Gaisie-Essilfie
* based on code from https://winsharp93.wordpress.com/2009/06/29/find-out-size-and-position-of-the-taskbar/
*
* Change Log:
* Date | Description
* -------------|--------------------------------------------------------------
* 2017-05-16 | Initial design
@alanstevens
alanstevens / Windows11_Setup.md
Last active May 26, 2024 09:48
Windows 11 Setup

This guide was created using Microsoft Windows 11 Pro

Version 21H2 build 22000.194

Installation

System Updates:

  • Settings -> Windows Update
  • Install all updates

Powershell Execution Policy:

  • launch Windows Powershell as administrator and execute: