Skip to content

Instantly share code, notes, and snippets.

@KingsleyOmon-Edo
KingsleyOmon-Edo / post_install.sh
Created October 23, 2017 23:43 — forked from waleedahmad/post_install.sh
Ubuntu post installation script for installing software of your choice.
#!/bin/bash
curl_check ()
{
echo "Checking for curl..."
if command -v curl > /dev/null; then
echo "Detected curl..."
else
echo "Installing curl..."
apt-get install -q -y curl
@KingsleyOmon-Edo
KingsleyOmon-Edo / class_logger.asp
Created November 22, 2017 19:48 — forked from CarlRevell/class_logger.asp
Simple classic ASP log to file class.
<%
'// Usage:
'//
'// dim l : set l = new logger
'// l.log("Hello")("World")
'// l.includeTimetamp = false
'// l("Lorem ipsum")
'// l.setLogFile("c:\temp\log_2.log").log("This is a new log!")
'// set l = nothing
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
@KingsleyOmon-Edo
KingsleyOmon-Edo / Ninject.Http.cs
Created February 12, 2018 20:01 — forked from odytrice/Ninject.Http.cs
A small Library to configure Ninject (A Dependency Injection Library) with a WebAPI Application.
using Ninject.Modules;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Http;
using System.Web.Http.Dependencies;
// A small Library to configure Ninject (A Dependency Injection Library) with a WebAPI Application.
@KingsleyOmon-Edo
KingsleyOmon-Edo / Ninject.Mvc.cs
Created February 12, 2018 20:03 — forked from odytrice/Ninject.Mvc.cs
A small Library to configure Ninject (A Dependency Injection Library) with an ASP.NET Application.
using Ninject;
using Ninject.Modules;
using Ninject.Web.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Mvc;
@KingsleyOmon-Edo
KingsleyOmon-Edo / google-fonts.sh
Created March 8, 2018 02:53 — forked from dyoungwd/google-fonts.sh
Install Google Fonts on fedora
# Original : Michalis Georgiou
# Modified : D4zzy for Fedora
_wgeturl="https://github.com/google/fonts/archive/master.tar.gz"
_gf="google-fonts"
# install wget
echo "Installing wget..."
sudo dnf install wget
@KingsleyOmon-Edo
KingsleyOmon-Edo / TransformWebConfigForProduction.ps1
Created May 19, 2018 07:56 — forked from GeorgDangl/TransformWebConfigForProduction.ps1
Deploying Asp.Net Core Applications from Jenkins to IIS or Azure via WebDeploy
$environmentName = "Production"
# Applying web.config transformations
$webConfigTransformatorPackages = Join-Path -Path $env:USERPROFILE -ChildPath "\.nuget\packages\WebConfigTransformRunner"
$latestWebConfigTranformator = Join-Path -Path ((Get-ChildItem -Path $webConfigTransformatorPackages | Sort-Object Fullname -Descending)[0].FullName) -ChildPath "Tools\WebConfigTransformRunner.exe"
$webConfigDirs = Get-ChildItem -Path "$PSScriptRoot\publish" -Recurse -Filter "web*.config" | Select -Property Directory -Unique
ForEach ($directory in $webConfigDirs.Directory){
$transformationSource = (Get-ChildItem -Path $directory -Filter ("web." + $environmentName + ".config"))
if ($transformationSource) {
$guid = [Guid]::NewGuid().ToString()
@KingsleyOmon-Edo
KingsleyOmon-Edo / wp-update.sh
Created May 20, 2018 23:03 — forked from pacoorozco/wp-update.sh
Backup and update a Wordpress Site using wp-cli
#!/usr/bin/env bash
##########################################################################
# Shellscript: Backup and update WordPress using wp-cli
# Author : Paco Orozco <paco@pacoorozco.info>
# Requires : wp-cli
##########################################################################
# Changelog
# 20170125: 1.0
# Adds a default option to upgrade only when it's needed.
# 20161220: 0.1
@KingsleyOmon-Edo
KingsleyOmon-Edo / Repository.cs
Created October 22, 2018 03:08 — forked from ChrisMcKee/Repository.cs
Generic Repository Interface and implementation. NHIBERNATE
namespace Core.Repository
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
public interface IRepository<T> where T : class
{
bool Add(T entity);
@KingsleyOmon-Edo
KingsleyOmon-Edo / Repository
Created October 22, 2018 03:12 — forked from MikeLarned/Repository
Repository
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using NHibernate;
using NHibernate.Linq;
namespace BMobile.Infrastructure.Entitys
{
public class Repository : IRepository