Skip to content

Instantly share code, notes, and snippets.

View ammogcoder's full-sized avatar

Akomolafe Moses G. ammogcoder

View GitHub Profile
@ammogcoder
ammogcoder / class_extractor.php
Created April 30, 2018 04:57 — forked from phpdreams/class_extractor.php
PHP snippet to extract the methods and parameters from a class you can't otherwise access.
<?php
/**
* Snippet to extract information about a class you don't have access to.
*/
$extractClass = $GLOBALS['someclass'];
$className = get_class( $extractClass );
$classMethods = get_class_methods( $extractClass );
echo "Class: $className\n";
[raw]
<h2 style="text-align: center;">Transferring to OtherMemberiumSite.com</h2>
<p style="text-align: center;"><img src="/wp-content/uploads/2016/04/icon-loading.gif" /></p>
[/raw]
<form id="memb-login" action="https://othermemberiumsite.com/wp-login.php" method="post">
<input type="hidden" name="log" id="user_login" class="input" value="[memb_contact fields='Email']" />
<input type="hidden" name="pwd" id="user_pass" class="input" value="[memb_contact fields='Password']" />
</form>
@ammogcoder
ammogcoder / rebuild-cache.php
Created April 30, 2018 04:58 — forked from phpdreams/rebuild-cache.php
Speaker List Cache Generation
<?php
// this will read in all the speakers, sort them by date, then store in a file for use later
$speakerList = [
'speaker-file',
];
$speakers_all = [];
foreach($speakerList as $speaker) {
$speakers_all[$speaker] = include_once("./speakers/{$speaker}.php");
$speakers_all[$speaker]['bullet-points'] = text2bullets($speakers_all[$speaker]['bullet-points']);
28faa4735993d5d6165e4756f456382faf0328c19d2480f88dfc7febede555fcde8c75db5ad61f4ae8f62c236ca33389ad2e3c8b06bd6a286a75075d00c09a58
@ammogcoder
ammogcoder / README.md
Created February 24, 2019 21:59
ASP.NET Core Active Directory Integration

Active Directory Authentication

This will provide an example of integrating Active Directory authentication in an ASP.NET Core app.

Note, you'll need to be running on a Windows domain with Visual Studio debugggin in IIS Express for this to work.

Setup

In launchSettings.json, you'll want to modify iisSettings by turning on windowsAuthentication:

@ammogcoder
ammogcoder / gist:206a4186992b40f85bc041a4aec51bf6
Created April 17, 2019 12:17 — forked from imranbaloch/gist:10895917
SqlHelper.cs class with async support
// ===============================================================================
// Microsoft Data Access Application Block for .NET
// http://msdn.microsoft.com/library/en-us/dnbda/html/daab-rm.asp
//
// cs
//
// This file contains the implementations of the SqlHelper and SqlHelperParameterCache
// classes.
//
// For more information see the Data Access Application Block Implementation Overview.
### Keybase proof
I hereby claim:
* I am ammogworld on github.
* I am ammogworld (https://keybase.io/ammogworld) on keybase.
* I have a public key ASAymQidLCeeHSJZ2k5mGU0Taz_hXiqz6dlAplzQRrNGSQo
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am ammogworld on github.
  • I am ammogworld (https://keybase.io/ammogworld) on keybase.
  • I have a public key ASAymQidLCeeHSJZ2k5mGU0Taz_hXiqz6dlAplzQRrNGSQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am ammogcoder on github.
  • I am ammogworld (https://keybase.io/ammogworld) on keybase.
  • I have a public key ASAymQidLCeeHSJZ2k5mGU0Taz_hXiqz6dlAplzQRrNGSQo

To claim this, I am signing this object:

@ammogcoder
ammogcoder / BasicMiddleware.cs
Created November 18, 2019 06:14 — forked from mjrousos/BasicMiddleware.cs
CustomMiddleware
// The middleware delegate to call after this one finishes processing
private readonly RequestDelegate _next;
public SOAPEndpointMiddleware(RequestDelegate next)
{
_next = next;
}