Skip to content

Instantly share code, notes, and snippets.

View dmitry's full-sized avatar
🇪🇪
Water, earth and air.

Dmitry Polushkin dmitry

🇪🇪
Water, earth and air.
View GitHub Profile
@kjlape
kjlape / Dockerfile
Last active November 22, 2024 14:16
Self-Hosted Docker Registry with Kamal (as of version 2.2.2)
FROM registry:2
App OSS? Supported OS Recording Mode Core Features Language
OpenAdapt macOS, Windows Intermittent Workflow automation, remote AI Python
Rewind macOS, Windows (soon) Continuous - includes audio Perfect recall (remote AI) Swift
Perfect Memory[^1.1] Windows Intermittent[^1.2] Perfect recall (local AI)[^1.3] -
ScreenDiary[^2.1] Linux Intermittent Perfect recall (no AI) Python
EssentialApp[^3.1] macOS Continuous - last 5m Coding assistant[^3.2], Perfect recall (remote AI)[^3.3] Swift
RetroClip[^4.1] macOS Continuous - last 5m Instant replay videos[^4.2] -
class Cond
IDENTITY = -> v { v }
def initialize(if_cond: IDENTITY, then_branch: IDENTITY, else_branch: IDENTITY)
@if_cond = if_cond
@then_branch = then_branch
@else_branch = else_branch
end
def call(v)
@prologic
prologic / LearnGoIn5mins.md
Last active February 12, 2025 06:52
Learn Go in ~5mins
@unrooted
unrooted / initSystemsCheatSheet.md
Created December 31, 2020 11:58
init systems cheat sheet

Manage services in systemd, openRC and runit

systemd

  • list all services: systemctl list-unit-files
  • list running services status: systemctl list-units
  • list failed services: systemctl --failed
  • list available services: systemctl --all
  • start a service: systemctl start [SERVICE_NAME]
  • stop a service: systemctl stop [SERVICE_NAME]
@rzane
rzane / README.md
Last active July 18, 2020 13:14
QueryExtensions

QueryExtensions

First, you'll need to incorporate the extension:

class ApplicationRecord < ActiveRecord::Base
  extend QueryExtensions
end
@ProGM
ProGM / arel_cheatsheet_on_steroids.md
Last active April 1, 2025 14:10
Arel cheatsheet on Steroids

Arel Cheatsheet on Steroids

A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.

Tables

posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord

Table alias

@kvnxiao
kvnxiao / awesome-go-sorted-by-stars-2019-12-30.md
Last active March 8, 2025 17:56
awesome-go-sorted-by-stars-2019-12-30.md

Awesome Go

Build Status Awesome Slack Widget Netlify Status

patreon avelino financial support to Awesome Go

A curated list of awesome Go frameworks, libraries and software. Inspired by awesome-python.

Contributing

@loilo
loilo / pass-slots.md
Last active February 20, 2025 09:47
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

Faster Rails tests

Feedback loop speed in one of the biggest contributing factors to overall development time. The faster you get results, the faster you can move on to other things. A fast enough test suite is therefore critical to teams' success, and is worth investing some time at the beginning to save in the long run.

Below is a list of techniques for speeding up a Rails test suite. It is not comprehensive, but should definitely provide some quick wins. This list of techniques assumes you're using minitest, but most everything should translate over to rspec by simply replacing test/test_helper.rb with spec/spec_helper.rb.