Skip to content

Instantly share code, notes, and snippets.

View aaronhelton's full-sized avatar

Aaron Helton aaronhelton

View GitHub Profile
{% extends 'base.html' %} {% block content %}
<div id="skeleton_vm" v-show="true" data-api_prefix="{{api_prefix}}">
<div class="row">
<skeletoncomponent api_prefix="{{api_prefix}}"></skeletoncomponent>
</div>
</div>
<script type="module" src="{{url_for('static', filename='js/skeleton_vm.js')}}" ></script>
import dlx_dl
import boto3
import re
from pymongo import MongoClient
ssm_client = boto3.client('ssm')
connect_string = ssm_client.get_parameter(Name='connect-string')['Parameter']['Value']
api_key = ssm_client.get_parameter(Name='undl-dhl-metadata-api-key')['Parameter']['Value']
nonce_key = ssm_client.get_parameter(Name='undl-callback-nonce')['Parameter']['Value']
callback_url = ssm_client.get_parameter(Name='undl-callback-url')['Parameter']['Value']
[
{
"leader": " 22 4500",
"fields": [
{
"000": "00000nam 22000255a 450|"
},
{
"001": "1653680"
},
use strict;
use warnings;
use feature 'say';
use lib '.\modules';
use MARC;
my $foo = MARC::Set->new;
$foo->import_file ( 'marc21', 'e_escwa_all.exp' );
@aaronhelton
aaronhelton / powershelldocker.md
Last active December 20, 2016 14:12
Windows PowerShell Docker Commands

Delete all of your collected docker images

Assumes your docker images list looks like:

<none> <none> 2b07576f6f81 ...

What you need from this list is 2b07576f6f81, which is the ID.

PS C:\> docker images | Select-String -Pattern '<none>' | foreach-object {docker rmi $_.tostring().split()[28]}

{
"size": 0,
"aggs": {
"filtered": {
"filter": {
"nested": {
"path" : "votes",
"query": {
"bool": {
"must": [{
{
"size": 0,
"aggs": {
"filtered": {
"filter": {
"match_all": {}
},
"aggs": {
"root": {
"date_histogram": {
{
"size": 0,
"aggs": {
"filtered": {
"filter": {
"match_all": {}
},
"aggs": {
"root": {
"terms": {
{
"size": 0,
"aggs": {
"filtered": {
"filter": {
"match_all": {}
},
"aggs": {
"root": {
"nested": {
{
"took" : 73,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 338,