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
| ; Copyright (c) Rich Hickey. All rights reserved. | |
| ; The use and distribution terms for this software are covered by the | |
| ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) | |
| ; which can be found in the file epl-v10.html at the root of this distribution. | |
| ; By using this software in any fashion, you are agreeing to be bound by | |
| ; the terms of this license. | |
| ; You must not remove this notice, or any other, from this software. | |
| ; modified by Chris Houser | |
| (require '[clojure.contrib.reflect :as hack]) |
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
| ;; DSL | |
| ;; ############################ | |
| (ns example.lib.cloudformation | |
| (:require [camel-snake-kebab.core :refer [->PascalCase]])) | |
| (defmacro defresource | |
| "Defines a resource. The CF name of the resource will be the same | |
| as the name given to it, except Pascal-cased, since that seems | |
| to be the style favoured by CF. Optionally, a literal name | |
| in the form of a keyword can be given as second argument to |
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
| #!/usr/bin/env bb | |
| ;; Example usage: | |
| ;; api_diff_bb.clj org.clojure/clojure "1.9.0" "1.10.1" | |
| ;; Output: | |
| ;; clojure/core_deftype.clj:587:1: warning: Arity 4 of clojure.core/emit-method-builder was removed. | |
| ;; clojure/core/reducers.clj:24:1: warning: clojure.core.reducers/compile-if was removed. | |
| (require '[babashka.pods :as pods]) |
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
| FROM alpine:3.11.3 | |
| RUN apk update && apk add curl ca-certificates unzip && rm -rf /var/cache/apk/* | |
| RUN curl -L 'https://github.com/babashka/babashka/releases/download/v0.2.10/babashka-0.2.10-linux-static-amd64.zip' -o /tmp/bb.zip && \ | |
| unzip /tmp/bb.zip && \ | |
| mv bb /usr/bin/bb && \ | |
| chmod +x /usr/bin/bb | |
| RUN mkdir -p /app |
Tested with Huawei Matebook X Pro (MACH-WX9) This is more or less a step by step tutorial, written 02/2021. Sadly at the moment Huawei does not ship a package in Linux Vendor Firmware Service.
Please note that you can damage ("brick") your device if something goes wrong or is done incorrectly. This is for the advanced user! I can only say that I flashed the new firmware 0.1.33 to my MACH-WX9 successfully.
dennemann.blog THX!!!
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
| #!/usr/bin/env bb | |
| #_" -*- mode: clojure; -*-" | |
| ;; Based on https://github.com/babashka/babashka/blob/master/examples/image_viewer.clj | |
| (ns http-server | |
| (:require [babashka.fs :as fs] | |
| [clojure.java.browse :as browse] | |
| [clojure.string :as str] | |
| [clojure.tools.cli :refer [parse-opts]] | |
| [org.httpkit.server :as server] |
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
| #!/usr/bin/env bb | |
| (ns reorder | |
| (:require [clojure.java.io :as io] | |
| [clojure.string :as string] | |
| [rewrite-clj.node :as n] | |
| [rewrite-clj.zip :as z] | |
| [rewrite-clj.zip.subedit :as zsub]) | |
| (:import (java.io File StringWriter))) | |
| (defn- top? [loc] |
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
| #!/usr/bin/env bash | |
| # temp file | |
| t=/tmp/bipe.$$.txt | |
| touch $t | |
| # read from stdin | |
| if [ ! -t 0 ]; then | |
| cat > $t |
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/env bb | |
| (let [cgb #(->> % (cons "http://169.254.169.254/latest") (str/join "/") curl/get :body) | |
| try-json #(try (json/parse-string %) (catch Exception _ %)) | |
| dir? #(str/ends-with? (last %) "/") | |
| paths (fn [p] (->> (cgb p) | |
| str/split-lines | |
| (map #(->> (str/split % #"=") first (conj p))))) | |
| trimlslash #(str/replace % #"/$" "")] | |
| (json/generate-stream |
OlderNewer