Skip to content

Instantly share code, notes, and snippets.

View Longlius's full-sized avatar

Matthew Longley Longlius

View GitHub Profile
@Longlius
Longlius / mailClient.py
Created September 17, 2012 01:16
Babby's first SMTP mail client in python 3 (ver 2 electric boogaloo)
#!/usr/bin/python
# Name: Matthew Longley
# Date: 2012/09/25
# Course: COMP 3825-001
# Project #1 - Mail Client
# NOTE: This program uses Python 3
import base64, getpass, socket, ssl, sys
@Longlius
Longlius / mailClient.py
Created September 11, 2012 09:53
Babby's first SMTP mail client in python 3
#!/usr/bin/python
# Name: Matthew Longley
# Date: 2012/09/25
# Course: COMP 3825-001
# Project #1 - Mail Client
import base64, getpass, socket, ssl
# Function - getServerAddr
@Longlius
Longlius / gist:5794287
Last active October 3, 2020 23:19
Hello world in IBM JCL
//HELLOW JOB
//* The IEBGENER program copies data
//S1 EXEC PGM=IEBGENER
//* Data to be copied
//SYSUT1 DD *
Hello, world!
//* Tells IEBGENER to copy data to the system output
//SYSUT2 DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
//SYSIN DD DUMMY
@Longlius
Longlius / curlexample_krogerstoresearch.txt
Created May 3, 2017 21:04
Curl request for getting Kroger locations
curl -XPOST -H "Content-Type:application/json" -d '{"query":"query storeSearch($searchText: String!, $filters: [String]!) {\n storeSearch(searchText: $searchText, filters: $filters) {\n stores {\n ...storeSearchResult\n }\n fuel {\n ...storeSearchResult\n }\n shouldShowFuelMessage\n }\n}\n\nfragment storeSearchResult on Store {\n banner\n vanityName\n divisionNumber\n storeNumber\n phoneNumber\n showWeeklyAd\n showShopThisStoreAndPreferredStoreButtons\n distance\n latitude\n longitude\n address {\n addressLine1\n addressLine2\n city\n countryCode\n stateCode\n zip\n }\n pharmacy {\n phoneNumber\n }\n}\n","variables":{"searchText":"38053","filters":[]},"operationName":"storeSearch"}' https://www.kroger.com/stores/api/graphql | jshon | less
{
"1022": {
"status_code": 1002,
"error_message": "Bad or missing protocol_id"
},
"4096": {
"status_code": 1002,
"error_message": "Bad or missing protocol_id"
},
"5038": {
Protocol ID: 1022
{"status_code":1002,"error_message":"Bad or missing protocol_id"}
Protocol ID: 4096
{"status_code":1002,"error_message":"Bad or missing protocol_id"}
@Longlius
Longlius / protocolsiojsonwithsteps.json
Created February 16, 2017 16:01
An example of protocols.io JSON output with steps included.
{
"api_version": "1",
"is_new_mode": "1",
"protocol_name": "Transformation of Skeletonema marinoi using Multipulse Electroporation",
"last_modified": "1487254340",
"type_id": "1",
"link": "",
"fork_id": "",
"public_fork_note": "",
"number_of_steps": "7",
@Longlius
Longlius / protocolsiojson.json
Created February 16, 2017 15:57
An example of protoocls.io json output
{
"api_version": "1",
"is_new_mode": "0",
"protocol_name": "Construction of microarrays and their application to virus analysis",
"last_modified": "1485996809",
"type_id": "1",
"link": "http://www.aslo.org/books/mave/MAVE_034.pdf",
"fork_id": "",
"public_fork_note": "",
"number_of_steps": "0",
@Longlius
Longlius / gpstestsketch2.ino
Created March 9, 2016 23:57
Arduino-based GPS logger code
#include <SD.h>
#include <TinyGPS.h>
#include <SoftwareSerial.h>
SoftwareSerial shield(2,3); // configure software serial port
// Create an instance of the TinyGPS object
TinyGPS gps;
void setup()
{
@Longlius
Longlius / derpybot.lisp
Created August 23, 2013 03:51
excerpt from derpybot
;;;; derpybot.lisp - main program file
(in-package #:derpybot)
;;; TOP-LEVEL DEFINITIONS
;;; *irc-host* - hostname of IRC server to connect to
(defparameter *irc-host* (string "irc.rizon.net"))
;;; *irc-port* - port number of IRC server to connect to
(defparameter *irc-port* 6660)
;;; *irc-nick* - nick for the bot to connect with
(defparameter *irc-nick* (string "DerpyBot"))