Skip to content

Instantly share code, notes, and snippets.

@yaoyi
yaoyi / gist:5f9ff5f1ccad2cd3c1ab8a48bc74e2f2
Created December 31, 2016 06:45
Prevent your SSH connection from freezing
cd /Users/yourname/.ssh
# If you get ""-bash: cd: .ssh: No such file or directory"
# You need to create it
mkdir /Users/yourname/.ssh
# Set security on the folder so only you can read, write and execute
chmod 700 /Users/yourname/.ssh
# Change directory
@yaoyi
yaoyi / gist:e40153cd9d3766323eb9738952ce8e07
Created January 1, 2017 17:08
解决手机页面overflow scroll滑动很卡的问题
加入代码可解决这种卡顿的问题:
-webkit-overflow-scrolling: touch;
@yaoyi
yaoyi / citus_cheatsheet.sql
Created October 13, 2019 03:51 — forked from sfriquet/citus_cheatsheet.sql
Citus Cheatsheet
-- Set number of shard
ALTER DATABASE citus SET citus.shard_count = 64;
-- Explain across all shards
SET citus.explain_all_tasks TO true;
-- Size of all distributed tables excluding indexes but including TOAST, free space map, and visibility map
SELECT logicalrelid::text tablename, pg_size_pretty(citus_table_size(logicalrelid::text)) size FROM pg_dist_partition group by tablename;
-- Size of all distributed tables including all indexes and TOAST data