Skip to content

Instantly share code, notes, and snippets.

View danielDevelops's full-sized avatar

Daniel Martin danielDevelops

View GitHub Profile
@danielDevelops
danielDevelops / CacheContainer.cs
Last active November 27, 2019 17:59
.Net Caching Engine
using CommonInterfaces.Infrastructure;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cache
{
@danielDevelops
danielDevelops / bashrc
Last active November 17, 2020 15:15
My Custom Bash Profile
#System-wide .bashrc file for interactive bash(1) shells.
export BASH_SILENCE_DEPRECATION_WARNING=1
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
gray="\001\e[90m\002"
@danielDevelops
danielDevelops / BingWallpaper.sh
Last active November 30, 2020 03:16
Script to set Bing Image to MacOS background. (crontab 26 10 * * * sh /Library/Application\ Support/BingWallpaper/BingWallpaper.sh)
#!/bin/bash
# $bing is needed to form the fully qualified URL for
# the Bing pic of the day
bing="https://www.bing.com"
# $xmlURL is needed to get the xml data from which
# the relative URL for the Bing pic of the day is extracted
# The idx parameter determines where to start from. 0 is the current day,
# 1 the previous day, etc.
@danielDevelops
danielDevelops / Config.cs
Last active August 13, 2019 19:55
Simple AppConfig class that supports caching of the data from the app.config or web.config
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Collections.Concurrent;
namespace Config
{
public static class AppConfig
{
private static readonly AppConfigValues _config = new AppConfigValues();