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
(defun my-produce-basic-auth-header-value (username password) | |
"produce an HTTP Basic Auth header value for a given username and password." | |
(concat "Basic " | |
(base64-encode-string | |
(concat username ":" password)))) | |
(request | |
"https://api.enterprise.apigee.com/v1/o/deecee/apis" | |
:headers `(("authorization" . ,(my-produce-basic-auth-header-value username password)) | |
("accept" . "application/json")) |
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
(defun csharp-set-flycheck-command () | |
"Set the flycheck command, dynamically, as a side effect. | |
This function is intended for use as a before-syntax-check-hook with | |
flycheck. Use it like this: | |
(add-hook 'flycheck-before-syntax-check-hook #'csharp-set-flycheck-command) | |
Then, in your csharp file, specify this in the comments at the header. |
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
// WinFormsHello.cs | |
// | |
// flycheck: gmcs /t:module /debug+ -pkg:dotnet %f | |
// | |
// ------------------------------------------------------------------ | |
// | |
using System; | |
using System.Windows.Forms; |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; fixup path | |
;; for each directory in the list, if it exists, and is not already | |
;; present on the path, add it to path. | |
(let ((path-elts (split-string (getenv "PATH") ":"))) | |
(dolist (path '("/usr/local/bin" | |
"/Library/Frameworks/Mono.framework/Versions/Current/bin")) | |
(and (file-directory-p path) | |
(not (member path path-elts)) | |
(setenv "PATH" (concat (getenv "PATH") ":" path))))) |
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; -*- | |
# | |
# exercise-apigee-admin-APIs.sh | |
# | |
# A bash script for demonstrating the use of the administrative APIs for | |
# Apigee Edge, to deploy new APIs and invoke them. | |
# | |
# | |
# created: 2014-February-04 |
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
// xformResponse.js | |
// ------------------------------------------------------------------ | |
// | |
// pre-transform the response before the XML-to-JSON step. | |
// | |
// created: Wed Jan 7 08:06:03 2015 | |
// last saved: <2015-January-07 10:41:38> | |
// expected input: | |
// |
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
/* | |
* ugCollectionForEach | |
* | |
* Iterates through all items IN A SINGLE PAGE of a collection within | |
* Apigee Edge BaaS. Uses the Usergrid client object from the usergrid | |
* module. Notice - this logic does not call {has,get}NextPage(). | |
* | |
* @param ugClient - the authenticated client object | |
* @param options - the options for a collection. Pass type and qs. | |
* @param f - function called with each UG entity. Accepts a single argument. |
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
/* | |
* ugCollectionForEachPaging | |
* | |
* Iterates through all items in a collection within | |
* Apigee Edge BaaS. Uses the Usergrid client object from the usergrid | |
* module. Notice - this logic calls {has,get}NextPage(). | |
* | |
* @param ugClient - the authenticated client object | |
* @param options - the options for a collection. Pass type and qs. | |
* @param f - function called with each UG entity. Accepts a single argument. |
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; -*- | |
# | |
# fixupScreenshotName.sh | |
# | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 by Dino Chiesa | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>local.screenshot.fixup</string> | |
<key>Program</key> | |
<string>/Users/YOURSELF/dev/bash/fixupScreenshotName.sh</string> | |
<key>RunAtLoad</key> | |
<false/> |