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 | |
| set -e | |
| GRPC_FORMULA_URL="https://raw.githubusercontent.com/grpc/homebrew-grpc/bcff6876c0f692508e394ba01801e3aced083395/Formula/grpc.rb" | |
| GOOGLE_PROTOBUF_FORMULA_URL="https://raw.githubusercontent.com/grpc/homebrew-grpc/bcff6876c0f692508e394ba01801e3aced083395/Formula/google-protobuf.rb" | |
| PROTOC_GEN_GRPC_JAVA_URL="http://search.maven.org/remotecontent?filepath=io/grpc/protoc-gen-grpc-java/1.1.2/protoc-gen-grpc-java-1.1.2-osx-x86_64.exe" | |
| PROTOC_GEN_GRPC_JAVA_PATH="/usr/local/bin/protoc-gen-grpc-java" | |
| brew unlink google-protobuf grpc | |
| brew install --without-python "${GOOGLE_PROTOBUF_FORMULA_URL}" |
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
| require 'net/http' | |
| require 'thread' | |
| require 'uri' | |
| uri = URI('http://theinternate.com') | |
| response_queue = Queue.new | |
| threads = (1..3).map do | |
| Thread.new do |thread| | |
| response_queue << Net::HTTP.get_response(uri) |
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
| ffmpeg -i source.mov -c:v libx264 -crf 18 -profile:v high -level 4.0 -pix_fmt yuv420p -preset veryslow -tune animation output.mp4 |
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
| (ns query-optim.core | |
| (:require [clojure.spec :as s] | |
| [clojure.spec.gen :as gen] | |
| [clojure.string :refer [starts-with?]] | |
| [clojure.test.check.generators :as generators])) | |
| (s/def ::query | |
| (s/cat :find-spec ::find-spec | |
| :with-clause (s/? ::with-clause) |
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
| WITH RECURSIVE ancestors(id, name, created_at, updated_at) AS ( | |
| SELECT categories.id, categories.name, categories.created_at, categories.updated_at | |
| FROM categories, categorizations | |
| WHERE categorizations.subcategory_id = '667C9DF5-48C0-496B-922A-1B7D743B1A39' | |
| AND categories.id = categorizations.category_id | |
| UNION ALL | |
| SELECT categories.id, categories.name, categories.created_at, categories.updated_at | |
| FROM categories, categorizations, ancestors | |
| WHERE categorizations.subcategory_id = ancestors.id | |
| AND categories.id = categorizations.category_id |
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
| (ns categories.core | |
| (:require [datomic.api :as d])) | |
| (let [uri (str "datomic:mem://" (gensym)) | |
| conn (and (d/create-database uri) (d/connect uri))] | |
| @(d/transact conn [{:db/id #db/id[:db.part/db] | |
| :db/ident :category/name | |
| :db/valueType :db.type/string | |
| :db/cardinality :db.cardinality/one |
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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'rails', github: 'rails/rails' |
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
| (ns dropwarlock.reducers) | |
| (defprotocol Reducee | |
| (reduce-with-instructions [this inst f])) | |
| (extend-protocol Reducee | |
| clojure.lang.PersistentVector | |
| (reduce-with-instructions [this [action acc] f] | |
| (case action | |
| :cont (if (empty? this) |
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 python | |
| DOCUMENTATION = ''' | |
| --- | |
| module: bugsnag_deployment | |
| short_description: Notifies Bugsnag of deploys. | |
| options: | |
| api_key: | |
| description: | |
| - The API Key associated with the project. Informs Bugsnag which project |
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
| Run options: --seed 53381 | |
| # Running: | |
| . | |
| Finished in 0.000873s, 1145.2393 runs/s, 1145.2393 assertions/s. | |
| 1 runs, 1 assertions, 0 failures, 0 errors, 0 skips |