Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@deveshjeshani
deveshjeshani / setup-git-configs.ps1
Last active July 7, 2022 10:48
git config settings
git config --global remote.origin.prune true
git config --global rerere.enabled true
git config --global push.autoSetupRemote true
git config --global alias.lg "log --oneline --graph --decorate"
git config --global alias.s "status"
git config --global alias.b "branch --all"
git config --global alias.ch "checkout"
git config --global color.ui.auto true
git config --global color.status.added "green normal bold"
git config --global color.status.changed "red normal bold"
@plaurin
plaurin / DependenciesVisualizer.linq
Last active August 17, 2018 10:41
LinqPad query to generate a DMGL of projects, libraries and NuGet packages dependencies
<Query Kind="Program" />
private string[] projectExtensionExclusions = new[] { ".vdproj", ".ndproj", ".wdproj", ".shfbproj" };
private string rootFolder = @"C:\Users\Pascal\Dev\MyProject";
void Main()
{
LoadAllProjects();
LoadAllPackagesConfig();
GenerateDGML(Path.Combine(rootFolder, "Dependencies.dgml"));
@jogleasonjr
jogleasonjr / SlackClient.cs
Last active October 20, 2023 15:54
A simple C# class to post messages to a Slack channel. You must have the Incoming WebHooks Integration enabled. This class uses the Newtonsoft Json.NET serializer available via NuGet. Scroll down for an example test method and a LinqPad snippet. Enjoy!
using Newtonsoft.Json;
using System;
using System.Collections.Specialized;
using System.Net;
using System.Text;
//A simple C# class to post messages to a Slack channel
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet
public class SlackClient
{
@timiles
timiles / bypass server certificate validation check
Last active September 29, 2017 15:43
bypass server certificate validation check
System.Net.ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true;
@aarongustafson
aarongustafson / responsive-iframes.css
Created October 25, 2011 17:07
Responsive iFrames with jQuery
iframe {
max-width: 100%;
}