Skip to content

Instantly share code, notes, and snippets.

View Structed's full-sized avatar
🎮

Johannes Ebner Structed

🎮
View GitHub Profile
@lancscoder
lancscoder / Connection.cs
Created February 14, 2012 19:28
Dapper Getting Started
public class ConnectionFactory {
public static DbConnection GetOpenConnection() {
var connection = new SqlConnection("MyConnectionString");
connection.Open();
return connection;
}
}
@codingoutloud
codingoutloud / .gitignore
Last active October 9, 2016 15:34
Git Ignore for ASP.NET MVC / Windows Azure development
# .gitignore for ASP.NET MVC / Windows Azure development
# Original file: https://gist.github.com/3318347 by @codingoutloud
## Github doc on ignoring files: https://help.github.com/articles/ignoring-files
## The man page for .gitignore (referenced by github): http://man.cx/gitignore
## Of possible interest (can be complex): https://github.com/github/gitignore
# Troubleshooting
# 1. If you add a .gitignore file to an existing repo (or significantly change one), you may want
# to force it to act as though the new/updated .gitignore was in force the whole time.
## http://stackoverflow.com/questions/1139762/gitignore-file-not-ignoring
@indyfromoz
indyfromoz / aspnet-mvc.gitignore
Created November 19, 2012 06:44
.Gitignore for ASP.NET MVC
###################
# compiled source #
###################
*.com
*.class
*.dll
*.exe
*.pdb
*.dll.config
*.cache
@Larry57
Larry57 / ini.cs
Last active February 21, 2024 05:05
A single class to read and write INI files.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
public class Ini
{
Dictionary<string, Dictionary<string, string>> ini = new Dictionary<string, Dictionary<string, string>>(StringComparer.InvariantCultureIgnoreCase);
string file;
@shsteimer
shsteimer / gist:7257245
Created October 31, 2013 21:10
Tip to delete tags by pattern
#delete all the remote tags with the pattern your looking for, ie. DEV-
git tag | grep <pattern> | xargs -n 1 -i% git push origin :refs/tags/%
#delete all your local tags
git tag | xargs -n 1 -i% git tag -d %
#fetch the remote tags which still remain
git fetch
@rudyryk
rudyryk / Badge.cs
Last active November 9, 2023 08:57
C# — Xamarin.Forms custom simple badge view + rounded box view via custom renderer
//
// Badge.cs
// Created by Alexey Kinev on 19 Jan 2015.
//
// Licensed under The MIT License (MIT)
// http://opensource.org/licenses/MIT
//
// Copyright (c) 2015 Alexey Kinev <alexey.rudy@gmail.com>
//
using System;

Live Transcoding

This is a collection of working commandline examples to show how one could use FFMpeg and VLC for live transcoding of video streams. All examples have been tested on OSX 10.7.5 with FFMPeg 1.1.3 and VLC 2.0.5 in early 2013.

Documentation links

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public static class ListExtensions
{
public static T PickRandom<T>(this IList<T> source)
{
if (source.Count == 0)
return default(T);
@benjaminjackman
benjaminjackman / README
Last active October 26, 2019 10:09
Instructions on how to open Unity3d scripts in Rider on Ubuntu
#Simple instructions for using Unity3d with project rider on Ubuntu
#1. Download and install latest .deb for Unity3d from:
http://forum.unity3d.com/threads/unity-on-linux-release-notes-and-known-issues.350256/
#2. Download and install the Project Rider EAP (not sure if publicly available but you
can sign up for early access here: https://www.jetbrains.com/rider/
#3. Open the Unity3d (.deb installs the executable at /opt/Unity/Editor/Unity )
@iamarcel
iamarcel / Creating Neat .NET Core Command Line Apps.md
Last active November 28, 2023 10:41
Creating Neat .NET Core Command Line Apps

Creating Neat .NET Core Command Line Apps

You can now read this on my (pretty) website! Check it out here.

Every reason to get more HackerPoints™ is a good one, so today we're going to write a neat command line app in .NET Core! The Common library has a really cool package Microsoft.Extensions.CommandlineUtils to help us parse command line arguments and structure our app, but sadly it's undocumented.

No more! In this guide, we'll explore the package and write a really neat