Skip to content

Instantly share code, notes, and snippets.

View 34code's full-sized avatar
🌴
On vacation

sambit 34code

🌴
On vacation
View GitHub Profile
@VincentAntoine
VincentAntoine / timescaledb_tables_and_hypertables_sizes.sql
Last active August 28, 2022 23:08
Query to list all tables and hypertables in a Postgresql / TimescaleDB database with their total size
WITH chunks AS (
SELECT
ht.schema_name AS hypertable_schema,
ht.table_name AS hypertable_name,
ck.table_name AS chunk_name
FROM _timescaledb_catalog.hypertable ht
JOIN _timescaledb_catalog.chunk ck
ON ht.id = ck.hypertable_id
),
@vindarel
vindarel / Common Lisp VS Racket - testimonies.md
Last active April 20, 2024 03:18
Common Lisp VS Racket. Feedback from (common) lispers.

Developer experience, libraries, performance… (2021/11)

I'll preface this with three things. 1. I prefer schemes over Common Lisps, and I prefer Racket of the Schemes. 2. There is more to it than the points I raise here. 3. I assume you have no previous experience with Lisp, and don't have a preference for Schemes over Common Lisp. With all that out of the way... I would say Common Lisp/SBCL. Let me explain

  1. SBCL Is by far the most common of the CL implementations in 2021. It will be the easiest to find help for, easiest to find videos about, and many major open source CL projects are written using SBCL
  2. Download a binary directly from the website http://www.sbcl.org/platform-table.html (even for M1 macs) to get up and running (easy to get started)
  3. Great video for setting up Emacs + Slime + Quick Lisp https://www.youtube.com/watch?v=VnWVu8VVDbI

Now as to why Common Lisp over Scheme

@JasonTrue
JasonTrue / searchkick_and_elasticsearch_guidance.md
Last active March 7, 2024 14:42
Searchkick and Elastic Search guidance

Resources:

https://github.com/ankane/searchkick

Indexing

By default, simply adding the call 'searchkick' to a model will do an unclever indexing of all fields (but not has_many or belongs_to attributes).

In practice, you'll need to customize what gets indexed. This is done by defining a method on your model called search_data

def search_data

@rubyconvict
rubyconvict / bulk_reindexer.rb
Last active February 15, 2023 21:42 — forked from VvanGemert/bulk_reindexer.rb
Asynchronous bulk reindexing module for Searchkick with Sidekiq
# https://medium.com/rubyinside/asynchronous-elasticsearch-bulk-reindexing-with-rails-searchkick-and-sidekiq-26f2f9aa8513
# https://github.com/ankane/searchkick
# 2.3.2 [unreleased]
# - Added wait option to async reindex
# Searchkick.reindex(async: {wait: true})
# This code has been ported to searchkick.
require 'sidekiq/api'
# BulkReindexer
module BulkReindexer
@makmanalp
makmanalp / comparison.md
Last active March 14, 2023 14:58
Angular vs Backbone vs React vs Ember notes

Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.

My top contenders, mostly based on popularity / community etc:

  • Angular
  • Backbone
  • React
  • Ember

Mostly about MVC (or derivatives, MVP / MVVM).