This file contains 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 | |
rm ~/.config/kitty/theme.conf | |
ln -s ./kitty-themes/themes/$1.conf ~/.config/kitty/theme.conf |
This file contains 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 amm | |
println("hello world") |
This file contains 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
package app.util | |
import org.scalajs.dom.document | |
import org.scalajs.dom.experimental.{BodyInit, Response, Request => FetchRequest} | |
import scala.scalajs.js | |
import scala.scalajs.js.{Promise, UndefOr} | |
import sttp.capabilities.Effect | |
import sttp.client3.{AbstractFetchBackend, FetchOptions} | |
import sttp.client3.impl.zio._ | |
import sttp.client3.internal.NoStreams |
This file contains 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
package zio.test | |
import play.api.test._ | |
import play.api.test.Helpers._ | |
import zio.{UIO, URIO} | |
import zio.clock.Clock | |
import zio.duration._ | |
import zio.test.environment.TestEnvironment | |
/** A Play 2.3+ runnable spec that provides testable versions of all of the |
This file contains 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
{ | |
“took”: 2, | |
“timed_out”: false, | |
“_shards”: { | |
“total”: 11, | |
“successful”: 11, | |
“skipped”: 0, | |
“failed”: 0 | |
}, |
This file contains 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
{ | |
"total": 237, | |
"reports": [ | |
{ | |
"succeed": true, | |
"details": { | |
"id": "57d14f5f2c0000491fd32c74" | |
} | |
}, | |
{ |
This file contains 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
-- I'm pretty sure the code can be simplified, but for 5mins work is OK :P | |
-- run with calculate(66) | |
ages maxAge = [ (a, b) | a <- [1..maxAge], b <- [1..maxAge] ] | |
calculate :: Integer -> [(Integer, Integer)] | |
calculate sumedAges = filter (valid sumedAges) $ ages sumedAges | |
valid:: Integer -> (Integer, Integer) -> Bool | |
valid sumedAges (x, y) = |
This file contains 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
{sql, _} = Repo.to_sql(:all, query) | |
IO.puts sql |
This file contains 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
class NullCustomer... | |
def plan=; end | |
def plan | |
BillingPlan.basic | |
end | |
def name=; end | |
def name | |
'occupant' | |
end |
This file contains 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
class MountainBike | |
def price | |
case @type_code | |
when :rigid | |
(1 + @commission) * @base_price | |
when :front_suspension | |
(1 + @commission) * @base_price + @front_suspension_price | |
when :full_suspension | |
(1 + @commission) * @base_price + @front_suspension_price + | |
@rear_suspension_price |
NewerOlder