Skip to content

Instantly share code, notes, and snippets.

@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 <[email protected]>
# Requires : wp-cli
##########################################################################
# Changelog
# 20170125: 1.0
# Adds a default option to upgrade only when it's needed.
# 20161220: 0.1
using MySql.Data.MySqlClient;
using System.Data;
public class Admin
{
private DataTable GetDatabase(string sqlQuery)
{
DataTable returnedData = new DataTable();
MySqlConnection connection = new MySqlConnection();
@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
@KingsleyOmon-Edo
KingsleyOmon-Edo / dotnetlayout.md
Created June 25, 2019 22:54 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@KingsleyOmon-Edo
KingsleyOmon-Edo / MediatRExtensions.cs
Created February 26, 2020 00:46 — forked from rmacfie/MediatRExtensions.cs
Register MediatR handlers in Asp.Net 5 / vNext / Core
namespace Microsoft.AspNet.Builder
{
public static class MediatRExtensions
{
public static IServiceCollection AddMediatR(this IServiceCollection services, params Assembly[] handlerAssemblies)
{
services.AddTransient<IMediator>(x => new Mediator(x.GetService<SingleInstanceFactory>(), x.GetService<MultiInstanceFactory>()));
services.AddTransient<SingleInstanceFactory>(x => t => x.GetRequiredService(t));
services.AddTransient<MultiInstanceFactory>(x => t => x.GetServices(t));

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@KingsleyOmon-Edo
KingsleyOmon-Edo / dotnet-framework-build-action.yml
Created December 18, 2020 05:47 — forked from CalvinAllen/dotnet-framework-build-action.yml
A GitHub Action to build a .NET Framework Web Application and Deploy it to Azure
name: EZRep Build
on:
push:
branches: master
jobs:
build:
runs-on: windows-latest
@KingsleyOmon-Edo
KingsleyOmon-Edo / install.sh
Created May 21, 2021 01:40 — forked from phillipsj/install.sh
Setup for Kubuntu 20.04 enhanced session.
#!/bin/bash
#
# This script is for Ubuntu 20.04 Focal Fossa to download and install XRDP+XORGXRDP via
# source.
#
# Major thanks to: http://c-nergy.be/blog/?p=11336 for the tips.
#
###############################################################################
dotnet nuget add source https://api.nuget.org/v3/index.json --name nuget.org