Skip to content

Instantly share code, notes, and snippets.

View ammogcoder's full-sized avatar

Akomolafe Moses G. ammogcoder

View GitHub Profile

ZPL Commands

Command Format Description
^A ^Afo,h,w,d:f.x Use Scalable/Bitmapped Font
^A@ ^A@o,h,w,d:f.x Use Font Name to Call Font
^B0 ^B0a,b,c,d,e,f,g Aztec Bar Code Parameters
^B1 ^B1o,e,h,f,g Code 11 Bar Code
^B2 ^B2o,h,f,g,e,j Interleaved 2 of 5 Bar Code
^B3 ^B3o,e,h,f,g Code 39 Bar Code
package com.ryan.practice.rest;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
@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;
}
@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.
@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 / 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']);
[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 / 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";