Skip to content

Instantly share code, notes, and snippets.

@qsimpleq
qsimpleq / datetime.ru.yml
Created August 10, 2023 14:36 — forked from kugaevsky/datetime.ru.yml
Datetime Russian i18n for Ruby on Rails
ru:
date:
formats:
# Форматы указываются в виде, поддерживаемом strftime.
# По умолчанию используется default.
# Можно добавлять собственные форматы
#
#
# Use the strftime parameters for formats.
# When no format has been given, it uses default.
local wezterm = require 'wezterm';
local act = wezterm.action
local selected_scheme = 'Dark+';
local custom_colors = wezterm.get_builtin_color_schemes()[selected_scheme];
custom_colors.scrollbar_thumb = '#4f5255';
custom_colors.tab_bar = {
active_tab = {
bg_color = '#222528',
fg_color = '#c0c0c0',
}
@qsimpleq
qsimpleq / postgres_queries_and_commands.sql
Created July 15, 2021 08:54 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@qsimpleq
qsimpleq / archived.md
Created May 16, 2021 12:11 — forked from nevack/archived.md
[ARCHIVED] Fix for CSR Dongle 0a12:0001 ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

This gist is currenctly archived.

Please refer to previous revisions if you know what to do.

The patch proposed was merged into kernel in 5.8 release, but no longer working as of linux 5.11

Please contact me, if you have new info about workarounds for CSR Bluetooth Dongle.

Telegram:

@qsimpleq
qsimpleq / curl.md
Created May 18, 2019 08:43 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

# этап 1
sudo dpkg --add-architecture i386 \
&& sudo wget -nc https://dl.winehq.org/wine-builds/Release.key \
&& sudo apt-key add Release.key \
&& sudo apt-add-repository -y 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' \
&& sudo apt-get update \
&& sudo apt -y dist-upgrade \
&& sudo apt install -y wine-staging wine-staging-compat \
&& sudo wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks -O /usr/local/bin/winetricks \
&& sudo chmod a+x /usr/local/bin/winetricks
@qsimpleq
qsimpleq / soroka
Last active September 18, 2018 12:26
# этап 1
sudo dpkg --add-architecture i386 \
&& sudo wget -nc https://dl.winehq.org/wine-builds/Release.key \
&& sudo apt-key add Release.key \
&& sudo apt-add-repository -y 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' \
&& sudo add-apt-repository -y ppa:paulo-miguel-dias/mesa \
&& sudo apt-get update
&& sudo apt -y dist-upgrade
# этап 2
################ Unified Information ################
Cores per CPU = 4
Threads per CPU = 4
------------------ TLB Information ------------------
Instruction TLB:
- - - - - ITLB1: - - - - - - - - - - - - - - - - - -
Page size = 4 KB
Pages count = 32
Pages count = 32
Associativity: Fully associative
#!/usr/bin/env perl
use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/lib" }
use AnyEvent;
use AnyEvent::Ping;
my @a = ('127.0.0.1');
for my $iter (1 .. 10) {