Skip to content

Instantly share code, notes, and snippets.

View Danilo-Araujo-Silva's full-sized avatar

Danilo Araújo Silva Danilo-Araujo-Silva

View GitHub Profile
@xinthink
xinthink / README-kotlin-dsl-deps-ext-intro.md
Last active January 21, 2020 06:04
Defining Dependencies in Gradle Kotlin DSL

This's for the article Defining Dependencies in Gradle Kotlin DSL.

If you're using [kotlin-dsl] in a multi-project manner, you may want to define all the dependencies in one place. You can put the files into buildSrc, define dependencies in a compat way like this:

extra.deps {
    "kt"("stdlib-jre7")
    "auto" {
        "common"("com.google.auto:auto-common:0.8")
        "service"("com.google.auto.service:auto-service:1.0-rc3")
@subfuzion
subfuzion / curl.md
Last active June 29, 2024 16:04
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@brianjlandau
brianjlandau / deep_freeze.rb
Created September 2, 2009 16:05
Deep freeze for enumerable objects in Ruby
module Enumerable
def deep_freeze
unless self.is_a? String
frozen = self.dup.each do |key, value|
if (value.is_a?(Enumerable) && !value.is_a?(String))
value.deep_freeze
else
value.freeze
end
end