This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//IP LOCATION TRACKER BOOKMARKLET | |
//Original source: https://funbutlearn.com/2016/06/ip-location-tracker-bookmarklet-created.html | |
//modified API service from http://ip-api.com which doesn't support HTTPS to https://ipapi.co/ to have a secure endpoint & avoid Mixed Content blocking issue | |
javascript: (function() { | |
var text = ""; | |
if (window.getSelection) { | |
text = window.getSelection().toString(); | |
} else if (document.selection && document.selection.type != "Control") { | |
text = document.selection.createRange().text; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import uuid | |
from datetime import datetime, timedelta | |
import os | |
from folioclient.FolioClient import FolioClient | |
def handle(event, context): | |
if event.method != 'POST': | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymarc | |
from pymarc.exceptions import RecordLengthInvalid, RecordLeaderInvalid | |
from pymarc.exceptions import BaseAddressInvalid, BaseAddressNotFound | |
from pymarc.exceptions import RecordDirectoryInvalid, NoFieldsFound | |
class PermissiveMARCReader(pymarc.MARCReader): | |
"""PermissiveMARCReader: recovers from most pymarc exceptions""" | |
def __init__(self, marc_target, to_unicode=False, force_utf8=False, | |
hide_utf8_warnings=False, utf8_handling='strict'): | |
super(PermissiveMARCReader,self).__init__(marc_target, to_unicode, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def loadConfiguration() { | |
def environment = hasProperty('env') ? env : 'dev' | |
ext.environment = environment | |
println "Environment is set to: $environment" | |
def configFile = file('config.groovy') | |
def config = new ConfigSlurper(environment).parse(configFile.toURL()) | |
ext.config = config | |
} |