Skip to content

Instantly share code, notes, and snippets.

@cmenscher
cmenscher / importS3Csv.gs
Created June 8, 2018 21:44 — forked from katylava/importS3Csv.gs
Google Apps Script to import a CSV, stored securely on S3, to a Google Spreadsheet
var AWS_KEY = '<your key>';
var AWS_SECRET = '<your secret>';
function generateS3Url(bucket, path) {
var expiresDt = Math.floor(Date.now() / 1000) + (60 * 60 * 24); // can be up to 7 days from now
var stringToSign = 'GET\n\n\n' + expiresDt + '\n/' + bucket + '/' + encodeURIComponent(path);
var hmac = Utilities.computeHmacSignature(Utilities.MacAlgorithm.HMAC_SHA_1, stringToSign, AWS_SECRET, Utilities.Charset.UTF_8);
var signed = encodeURIComponent(Utilities.base64Encode(hmac));
@cmenscher
cmenscher / importS3Csv.gs
Created June 8, 2018 21:44 — forked from katylava/importS3Csv.gs
Google Apps Script to import a CSV, stored securely on S3, to a Google Spreadsheet
var AWS_KEY = '<your key>';
var AWS_SECRET = '<your secret>';
function generateS3Url(bucket, path) {
var expiresDt = Math.floor(Date.now() / 1000) + (60 * 60 * 24); // can be up to 7 days from now
var stringToSign = 'GET\n\n\n' + expiresDt + '\n/' + bucket + '/' + encodeURIComponent(path);
var hmac = Utilities.computeHmacSignature(Utilities.MacAlgorithm.HMAC_SHA_1, stringToSign, AWS_SECRET, Utilities.Charset.UTF_8);
var signed = encodeURIComponent(Utilities.base64Encode(hmac));

Keybase proof

I hereby claim:

  • I am cmenscher on github.
  • I am cmenscher (https://keybase.io/cmenscher) on keybase.
  • I have a public key ASCg82YtOAwFwNMGrIr-gIx2EaiimadVDloHjibdImDF8Qo

To claim this, I am signing this object:

@cmenscher
cmenscher / gist:14818671155979f1cdffddfa241b206f
Created March 8, 2017 22:08
Business Models and Operating Models
Business Models and Operating Models
(This reading is assembled from blogs at ashridgeonoperatingmodels.com)
What is the difference between a business model and an operating model and who cares? First, I don’t think that it matters how you define terms like business model or operating model or business architecture. But it does help to be consistent. In this blog I will offer some definitions, not because I think they are more right than other definitions but because, in order to develop definitions, you need to think through all the moving parts.
For me a business model is the larger concept. An operating model is a part of a business model. An operating model is the engine at the heart of the business model that helps make the business model work.
A business model defines the following
- the stakeholders with whom the organisation will interact
- the offer or promise that the organisation is making to each stakeholder segment
(customers, employees, investors, suppliers, etc both internal and external)
- th
@cmenscher
cmenscher / README.md
Created September 6, 2016 20:57 — forked from mems/README.md
Fix AdressBook errors in OSX 10.11

For /var/log/system.log full of errors like these ones:

kernel[0]: Sandbox: com.apple.Addres(XXXXX) deny(1) network-outbound /private/var/run/mDNSResponder
com.apple.AddressBook.InternetAccountsBridge[XXXXX]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
com.apple.AddressBook.InternetAccountsBridge[XXXXX]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:4 Err:-1 Errno:1 Operation not permitted

How to fix it?

Last updated: 2015-08-11

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

(via http://forum.xda-developers.com/htc-one-m8/development/ota-3-28-401-6-t2899900)
1. Download the firmware, stock or no red text hboot
2. Boot your M8 into the bootloader, and check for fastboot usb mode
3. CMD: fastboot oem rebootRUU
4a. fastboot flash zip 4.16.401.9-Firmware.zip [for the stock one]
4b. fastboot flash zip 4.16.401.9-Firmware-noredtext.zip [for the noredtext one]
4c. fastboot flash zip 4.16.401.9-noredtext-HBOOT-only.zip [You need at least 4.16.401.9 Stock Firmware to flash this one!]
4d. You need to do the command twice if the CMD says: "pre-update, reflash immediately"
5. If you get "Successful" at the end of the CMD output, type: fastboot reboot-bootloader
15:11:24 menscherc@DBNY-MENSCC-LM-> mvn -DskipTests -T 3
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.newsweek.cq:trending:bundle:1.5.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.sling:org.apache.sling.commons.scheduler:jar -> duplicate declaration of version (?) @ line 165, column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.newsweek.cq:operations:bundle:1.5.0-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for com.day.jcr.vault:vault:jar should not point at files within the project directory, ${basedir}/${project.parent.relativePath}/lib/com.day.jcr.vault-2.3.26.jar will be unresolvable by dependent projects @ line 88, column 25
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.newsweek.cq:installer:bundle:1.5.0-SNAPSHOT
@cmenscher
cmenscher / gist:e3cca7ba4d3a5e611deb
Last active August 29, 2015 14:01
NY Times Newsroom Innovation
To: The Masthead
From: Newsroom Innovation Team Subject: Our recommendations
Six months ago, at the request of Jill and Dean, this team of journalists began studying our newsroom and the changing digital landscape with the goal of making recommendations about where The Times can improve.
This effort comes at a moment when The Times is buzzing with innovative new initiatives. NYT Now is changing the way our journalism is presented on mobile devices. Cooking is reimagining our service journalism for digital platforms. Times Insider is pulling back the curtain on how our journalists work. The Upshot com- bines smart analysis, writing and data visualization with personality.
Even as we celebrate success in these new areas, our mandate was to look further into the future and ask what else we should consider to foster innovation around our core: The New York Times and the world-class journalism we produce day after day.
Our team embarked on a deep reporting project focused on how to expand the reach and impact
pm list packages -f