Skip to content

Instantly share code, notes, and snippets.

View Longlius's full-sized avatar

Matthew Longley Longlius

View GitHub Profile
@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()
{
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.0.1-1 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
@Longlius
Longlius / cart_prod.m
Created April 2, 2015 11:16
Cartesian product bullshit in Matlab for Ryan
Xbuilder = cell(1, 27);
for x = 1:3
for y = 1:3
for z = 1:3
i = (((x - 1) * 9) + ((y - 1) * 3) + (z - 1)) + 1;
Xbuilder{1,i} = [x 0 0; 0 y 0; 0 0 z;];
end
end
end
@Longlius
Longlius / Disable_Auto_Arrange_Win7explorer.bat
Last active August 29, 2015 14:07
Disable Auto Align Windows 7
@echo off
:: To reset all folders to default folder views
Reg Delete "HKCU\Software\Microsoft\Windows\Shell\BagMRU" /F
Reg Delete "HKCU\Software\Microsoft\Windows\Shell\Bags" /F
Reg Delete "HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags" /F
Reg Delete "HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU" /F
Reg Delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F
@Longlius
Longlius / Enable_Auto_Arrange_Win7explorer.bat
Last active August 29, 2015 14:07
Enable Auto Align Windows 7
@echo off
:: To reset all folders to default folder views
Reg Delete "HKCU\Software\Microsoft\Windows\Shell\BagMRU" /F
Reg Delete "HKCU\Software\Microsoft\Windows\Shell\Bags" /F
Reg Delete "HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags" /F
Reg Delete "HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU" /F
Reg Delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F