Skip to content

Instantly share code, notes, and snippets.

View mat-staszczyk's full-sized avatar

Mateusz Staszczyk mat-staszczyk

View GitHub Profile
@GustavoCaso
GustavoCaso / job_scheduler_using_ractor.rb
Last active January 5, 2021 04:30
Simple implementation for a job scheduler using ruby Ractor primitive
# How to install the latests version of ruby
# 1. clone ruby/ruby
# 2. autoconf
# 3. ./configure
# 4. cd ext/openssl && ruby extconf.rb --with-openssl-dir=<openssl_root>; make; make install
# 5. cd ../../
# 6. make
# 7. make install-nodoc
# You should be ready ti run this script!!!!
@Nakilon
Nakilon / news.md
Last active June 6, 2025 19:26
The most important (in my opinion) changes in Ruby versions

N -- new feature -- I may consider using it
B -- breaking change -- I should review my code

N def-expr now returns the symbol of its name instead of nil.
N Array#to_h converts an array of key-value pairs into a Hash.
N Enumerable#to_h converts a list of key-value pairs into a Hash.
N Binding#local_variable_get(symbol)
N Exception#cause provides the previous exception which has been caught at where raising the new exception.
@anvk
anvk / psql_useful_stat_queries.sql
Last active December 21, 2025 10:46
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables

⚠️ this is now stupidly out of date

Computers

  • 13" Macbook Pro 3.3 GHz i7 (late 2016)
  • Microsoft Surface Book (2016)

Peripherals

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 6, 2026 07:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@daz
daz / html5.haml
Created November 11, 2011 08:43
html5shiv in HAML
!!!
%html{ :lang => "en" }
%head
%meta{ :charset => "utf-8" }
%title HTML5 yo
/[if lt IE 9]
%script{ :src => '//html5shiv.googlecode.com/svn/trunk/html5.js' }