This file contains hidden or 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
#!/bin/bash | |
# -*- mode:shell-script; coding:utf-8; -*- | |
# | |
# pcopy is "preserve copy"? copy a file while preserving the directory structure. | |
# | |
# | |
# Created: <Fri Jun 24 13:07:52 2016> | |
# Last Updated: <2016-July-19 20:25:05> | |
# | |
# example: |
This file contains hidden or 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
// dateFormat.js | |
// ------------------------------------------------------------------ | |
// | |
// format a date, easily. | |
// | |
// created: Mon Jul 18 11:24:41 2016 | |
// last saved: <2016-July-18 11:47:12> | |
;(function (){ |
This file contains hidden or 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
// humanizeDuration.js | |
// ------------------------------------------------------------------ | |
// | |
// derived from https://github.com/EvanHahn/HumanizeDuration.js | |
// | |
// created: Mon Jul 18 11:13:09 2016 | |
// last saved: <2016-July-18 11:15:53> | |
;(function (){ |
This file contains hidden or 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
private LoadingCache<String, JWSVerifier> macVerifierCache; | |
... | |
macVerifierCache = CacheBuilder.newBuilder() | |
.concurrencyLevel(4) | |
.maximumSize(1048000) | |
.expireAfterAccess(10, TimeUnit.MINUTES) | |
.build(new CacheLoader<String, JWSVerifier>() { | |
public JWSVerifier load(String key) throws UnsupportedEncodingException { | |
byte[] keyBytes = key.getBytes(StandardCharsets.UTF_8); | |
// NB: this will throw if the string is not at least 16 chars long |
This file contains hidden or 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; restclient - invoke REST API calls from within Emacs | |
(require 'restclient) | |
(eval-after-load "restclient" | |
(if (not (fboundp 'json-pretty-print-buffer)) | |
(defun json-pretty-print-buffer () | |
(json-prettify-buffer)))) |
This file contains hidden or 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
# -*- restclient -*- | |
# | |
# URLs for querying Apigee Edge | |
# Yes, this runs within emacs. | |
:edge-auth := (dino-netrc-basic-auth-header "api.enterprise.apigee.com") | |
:mgmtserver = https://api.enterprise.apigee.com | |
GET :mgmtserver/v1/o/deecee/apis/parity-test99/revisions | |
Authorization: :edge-auth |
This file contains hidden or 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
// TestWebRequest.cs | |
// ------------------------------------------------------------------ | |
// | |
// Author: Dino | |
// initialized on: Fri Feb 26 17:00:17 2016 | |
// | |
// last saved: <2016-February-26 17:19:13> | |
// ------------------------------------------------------------------ | |
// | |
// Copyright © 2016 Dino Chiesa |
This file contains hidden or 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
#!/bin/bash | |
# -*- mode:shell-script; coding:utf-8; -*- | |
# | |
# findApiKey.sh | |
# | |
# A bash script for finding a particular API Key in an Apigee Edge organization. | |
# | |
# Last saved: <2016-February-05 17:30:50> | |
# |
This file contains hidden or 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
RewriteCond %{SERVER_PORT} !=443 | |
RewriteRule .* https://%{HTTP_HOST}/$1 [R=301,L] |