| #!ruby | |
| # Requirements: | |
| # brew install trash | |
| casks_path = '/opt/homebrew-cask/Caskroom' | |
| class Version < Array | |
| def initialize s | |
| super(s.split('.').map { |e| e.to_i }) |
I have a project that's been happily chugging along on Travis for a while. Its .travis.yml looks something like
script:
- node_modules/ember-cli/bin/ember testI wanted to add a second parallel build that did something very different. I didn't want to run ember test with a different Ember version or some other flag. I wanted to run a completely different command. Specifically, I wanted to run LicenseFinder's audit.
Travis has great docs on customizing parallel builds, but nothing describes how to do two completely different commands.
MIT License
Copyright (c) 2018 Josh Bode
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
| #! /bin/bash | |
| mkdir -p ./backgrounds | |
| function get_google_device_art { | |
| local device=$1 | |
| # Get the Google Device backgrounds | |
| curl "https://developer.android.com/distribute/marketing-tools/device-art-resources/$1/port_back.png" > "./backgrounds/$1_port_back.png" | |
| curl "https://developer.android.com/distribute/marketing-tools/device-art-resources/$1/port_fore.png" > "./backgrounds/$1_port_fore.png" |
| (require '[clojure.repl :as repl]) | |
| (defmacro &this [] | |
| `(->> (Exception.) | |
| .getStackTrace | |
| (map bean) | |
| (filter #(= "invoke" (:methodName %))) | |
| (map #(read-string (repl/demunge (:className %)))) | |
| (keep resolve) | |
| first)) |
- Proposal: SE-XXXX
- Authors: Chris Lattner, Joe Groff
Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.
This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.
Just use https://github.com/ripeworks/iro which gets the challenge below right!
Picking a Color on Mac is hard. Mainly due to the fact that several applications floating around the web ( AppStore and independant ), grab the color "incorrectly".
Why incorrectly?
| addEventListener('fetch', event => { | |
| event.respondWith(fetchAndCheckPassword(event.request)) | |
| }) | |
| async function fetchAndCheckPassword(req) { | |
| if (req.method == "POST") { | |
| try { | |
| const post = await req.formData(); | |
| const pwd = post.get('password') | |
| const enc = new TextEncoder("utf-8").encode(pwd) |