- High level overview https://yogthos.github.io/ClojureDistilled.html
- An Animated Introduction to Clojure https://markm208.github.io/cljbook/
- Interactive tutorial in a browser https://tryclojure.org/
- Interactive exercises http://clojurescriptkoans.com/
- Clerk notebooks with introductory examples https://github.clerk.garden/anthonygalea/notes-on-clojure
- More interactive exercises https://4clojure.oxal.org/
- Lambda Island tutorials https://lambdaisland.com/
- Functional Programming with Clojure resources https://practicalli.github.io/
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
# Rails production setup via SQLite3 made durable by https://litestream.io/ | |
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine. | |
# | |
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails | |
# | |
# in production you might want to map /data to somewhere on the host, | |
# but you don't have to! | |
# | |
FROM ruby:3.0.2 |
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
# frozen_string_literal: true | |
require 'benchmark' | |
require 'benchmark/ips' | |
require 'benchmark/memory' | |
require 'csv' | |
N_NUMBER_OF = 100_000 | |
ary = Array.new(N_NUMBER_OF) { ['one', 'two', 'three', 'four', 'five', 'six'] } |
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 ruby | |
# frozen_string_literal: true | |
# This program modifies the original output of git-churn program https://github.com/garybernhardt/dotfiles/blob/master/bin/git-churn. | |
# It highlights current project files in green colour. | |
unless Kernel.system('command -v git-churn &> /dev/null') | |
STDOUT.puts("Install git-churn first. See details at https://github.com/garybernhardt/dotfiles/blob/master/bin/git-churn") | |
Kernel.exit | |
end |
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
SLACK_TEXT_START: 'Pipeline <$CI_PIPELINE_URL|$CI_PIPELINE_ID> _has started_ *$CI_PIPELINE_SOURCE* job <$CI_JOB_URL|$CI_JOB_ID> on *$ENVIRONMENT* _at branch_ *<$CI_PROJECT_URL/commit/$CI_COMMIT_SHA|$CI_COMMIT_REF_NAME>*' | |
SLACK_TEXT_FINISH: 'Pipeline <$CI_PIPELINE_URL|$CI_PIPELINE_ID> _has finished_ *$CI_PIPELINE_SOURCE* job <$CI_JOB_URL|$CI_JOB_ID> on *$ENVIRONMENT* _at branch_ *<$CI_PROJECT_URL/commit/$CI_COMMIT_SHA|$CI_COMMIT_REF_NAME>* _and generated_ *<$ALLURE_DIR|Allure Reports>*' | |
##################################### | |
# Custom Slack POST-message report # | |
##################################### | |
slack_notification: | |
script: | |
- > | |
curl |
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
:root { | |
--violation-color: red; /* used for clear issues */ | |
--warning-color: orange; /* used for potential issues we should look into */ | |
} | |
/* IMAGES */ | |
/* | |
* Lazy-Loaded Images Check | |
* ==== |
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
"=== Memory when using `try` ===" | |
Total allocated: 40 bytes (1 objects) | |
Total retained: 0 bytes (0 objects) | |
allocated memory by gem | |
----------------------------------- | |
40 other | |
allocated memory by file | |
----------------------------------- |
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
# base dockerfile from https://github.com/evilmartians/terraforming-rails/blob/567566348a6a9893e10b9f857f1e5e58ba581b41/examples/dockerdev/.dockerdev/Dockerfile | |
# See explanation below | |
ARG RUBY_VERSION | |
FROM quay.io/evl.ms/fullstaq-ruby:$RUBY_VERSION-jemalloc-buster-slim as builder | |
ARG PG_MAJOR | |
ARG NODE_MAJOR | |
ARG BUNDLER_VERSION |
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 | |
URL=$1 | |
DOMAIN=$(echo "$URL" | awk -F[/:] '{print $4}') | |
## Domain starts with | |
if [[ $DOMAIN =~ $(echo ^\($(paste -sd'|' /home/your-user/.config/url-start.txt)\)$) ]]; then | |
chromium-browser "$URL" & disown | |
elif [[ $DOMAIN =~ $(echo ^\($(paste -sd'|' /home/your-user/.config/url-is.txt)\)$) ]]; then | |
firefox "$URL" & disown |
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 "yaml" | |
require "json" | |
require "tempfile" | |
module RuboCopAutoCollrect | |
class << self | |
def run_all!(targets, *cop_names, commit_log_format:, fixup_commit_log_format:) | |
plan(targets, *cop_names).each do |cop_name| | |
run!(targets, cop_name, commit_log_format: commit_log_format) | |
end |