Skip to content

Instantly share code, notes, and snippets.

@chrismckelt
chrismckelt / pr.md
Last active August 29, 2015 14:21 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "upstream"]
	url = https://github.com/chrismckelt/webminder.git
	fetch = +refs/heads/*:refs/remotes/upstream/*

Now add the line fetch = +refs/pull/*/head:refs/remotes/$$$$$$$$/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: $$$$ = origin or upstream

@chrismckelt
chrismckelt / dotnetlayout.md
Last active May 19, 2016 11:59 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  docs/
  src/
  tests/
  samples/
  artifacts/
  packages/
  build/
 lib/
@chrismckelt
chrismckelt / .gitconfig
Created February 9, 2016 04:57 — forked from robmiller/.gitconfig
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@chrismckelt
chrismckelt / AsyncHelper.cs
Created October 1, 2016 06:06 — forked from ChrisMcKee/AsyncHelper.cs
AsyncHelpers to simplify calling of Async/Task methods from synchronous context.
namespace My.Common
{
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
public static class AsyncHelpers
{
/// <summary>
@chrismckelt
chrismckelt / vlc.sh
Last active January 13, 2017 12:54 — forked from caasi/vlc.sh
vlc 2.2.0 and YouTube Live
cvlc v4l2:///dev/video0:width=640:height=480 --sout '#transcode{vcodec=h2
64,vb=1000,acodec=aac,ab=64,channels=2}:std{access=rtmp,mux=ffmpeg{mux=flv},dst=rtmp://a.rtmp.youtube.com/live2
/wv92-uxa8-d6u0-8r4p}'
raspivid -o - -t 0 -vf -hf -fps 30 -b 6000000 | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2
/wv92-uxa8-d6u0-8r4p
@chrismckelt
chrismckelt / SlackClient.cs
Created March 31, 2017 01:40 — forked from jogleasonjr/SlackClient.cs
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
{