Skip to content

Instantly share code, notes, and snippets.

View lighth7015's full-sized avatar
Perpetually exhausted.

Robert Butler lighth7015

Perpetually exhausted.
View GitHub Profile
@lighth7015
lighth7015 / soap.xml
Created September 8, 2019 21:59
Soap XML description
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<UserCredentials xmlns="http://mws.envisionrx.com/">
<UserID>string</UserID>
<Password>string</Password>
</UserCredentials>
</soap:Header>
<soap:Body>
<GetBrandEquivalentByGenericNDC xmlns="http://mws.envisionrx.com/">
@lighth7015
lighth7015 / soap.php
Last active September 8, 2019 23:09
PHP soap client
<?php
class UserCredentials {
public $Username;
public $Password;
public function __construct( $username, $password ) {
$this->Username = $username;
$this->Password = $password;
}
}
@lighth7015
lighth7015 / service-query.c
Created November 1, 2019 13:15
Query systemd's user bus to check for a service's existence.
#include <stdio.h>
#include <stdlib.h>
#include <systemd/sd-bus.h>
static sd_bus_error error = SD_BUS_ERROR_NULL;
static sd_bus_message *response;
static sd_bus *bus;
static int result;
static const char *path;
@lighth7015
lighth7015 / filter.sh
Created November 23, 2019 03:42
filter.sh
#!/usr/bin/env sh
IFS=' ';
parse() {
while read -r line; do
list=${line}
for NDC in ${list[@]}; do
if [[ "list[${NDC}]" -gt 0 ]]; then
@lighth7015
lighth7015 / SQL schemav
Created December 10, 2019 14:12
schema.sql
CREATE TABLE IF NOT EXISTS "drugs_list" (
"NDC" TEXT,
"DrugName" TEXT,
"GenericName" TEXT,
"Strength" INTEGER,
"StrengthUOM" TEXT,
"DoseForm" TEXT,
"MONY" TEXT,
"GPI" REAL,
"PackageSize" REAL,
@lighth7015
lighth7015 / query.sql
Created December 12, 2019 18:39
SQL to execute
SELECT "primary"."NDC" as "primaryNDC",
"generic"."NDC" as "genericNDC",
"primary"."MONY",
"primary"."ProductName" as "primaryDrug",
"generic"."ProductName" as "genericDrug",
"primary"."Strength",
"primary"."StrengthUOM",
FROM "drugs" AS "primary",
"drugs" AS "generic"
@lighth7015
lighth7015 / SkinnedBtn.ec
Created January 5, 2020 21:43
SkinnedBtn
import "ecere"
import "ecere.gui"
class SkinnedBtn: Button {
void OnRedraw(Surface surface) {
int tw = 0, th = 0;
int ot = 0, ol = 0,
ob = size.h, or = size.w;
@lighth7015
lighth7015 / output
Created January 6, 2020 19:39
InterVue client information
[robert.butler@mc01 debug.linux]$ du -ch InterVueClient
188K InterVueClient
188K total
[robert.butler@mc01 debug.linux]$ ldd InterVueClient
linux-vdso.so.1 (0x00007ffe851d3000)
libecere.so.0 => /usr/lib/libecere.so.0 (0x00007f2d3ad98000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f2d3abd0000)
libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007f2d3ab38000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f2d3ab00000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f2d3aae0000)
@lighth7015
lighth7015 / laravel-reflection.php
Last active January 8, 2020 01:12
Laravel Reflection
<?php
require_once 'vendor/autoload.php';
use Illuminate\Support\Arr;
/**
* Demo with some reflection, I'm working on this for a project and need
* this working or at least a viable workaround very soon, thanks!
*/
class SlackRegistration { }
@lighth7015
lighth7015 / theme.ec
Created January 8, 2020 21:44
eC Windows NT/9x theme
public import "ecere"
public import "ecere.gui.controls"
define skinBackground = Color { r = 192, g = 192, b = 192 };
define skinForeground = black;
define skinTextForeground = black;
define evenRowBackground = Color { 80, 70, 60 };
define selectionColor = blue;
static const char * buttonStates[SkinBitmap] = {