Skip to content

Instantly share code, notes, and snippets.

View hanefi's full-sized avatar
🧿

Hanefi Onaldi hanefi

🧿
View GitHub Profile
@hanefi
hanefi / Citus 11.1.md
Last active April 14, 2023 14:11
Generated Documentation of Citus using pg_readme

t

pg_extension_name: citus pg_extension_version: 11.1-1 pg_readme_generated_at: 2023-01-30 17:35:52.80893+03 pg_readme_version: 0.5.5

Citus distributed database

@hanefi
hanefi / LICENSE
Created February 25, 2021 07:24 — forked from noelbundick/LICENSE
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
-- when we have INSERT INTO dist SELECT stable_func() from dist; the function is evaluated on the coordinator
-- for INSERT INTO local SELECT stable_function from dist; the function is evaluated on the workers.
-- it seems acceptable to me, check with the team
CREATE OR REPLACE FUNCTION evaluate_on_master()
RETURNS int LANGUAGE plpgsql STABLE
AS $function$
BEGIN
@hanefi
hanefi / Instructions.md
Last active July 6, 2020 10:42 — forked from marcocitus/Instructions
Downgrade from 9.4 to 9.3 to 9.2

Instructions to downgrade from v9.4.0 to 9.3.x:

  1. Install Citus v9.3.x
  2. Copy citus--9.4-1--9.3-2.sql to /share/extension/citus--9.4-1--9.3-2.sql
  3. Restart PostgreSQL
  4. Run: ALTER EXTENSION citus UPDATE;
  5. Delete /share/extension/citus--9.4-1--9.3-2.sql

Instructions to downgrade from v9.4.0 to 9.2.4:

SELECT count(*) FROM users_table;
SELECT pg_sleep((random() * 10)::int), count(*) from users_Table;
SELECT pg_sleep(2), count(*) from users_Table;
SET citus.force_max_query_parallelization TO ON;
SELECT count(*) FROM users_table;
SET citus.force_max_query_parallelization TO ON;
@hanefi
hanefi / profile.ps1
Created February 22, 2019 23:22 — forked from timsneath/profile.ps1
PowerShell template profile: adds some useful aliases and functions
### PowerShell template profile
### Version 1.03 - Tim Sneath <tim@sneath.org>
### From https://gist.github.com/timsneath/19867b12eee7fd5af2ba
###
### This file should be stored in $PROFILE.CurrentUserAllHosts
### If $PROFILE.CurrentUserAllHosts doesn't exist, you can make one with the following:
### PS> New-Item $PROFILE.CurrentUserAllHosts -ItemType File -Force
### This will create the file and the containing subdirectory if it doesn't already
###
### As a reminder, to enable unsigned script execution of local scripts on client Windows,
#!/bin/bash
sudo apt update
# Grub updates scare me, so i'll just keep outdated packages for now
# sudo apt upgrade -y
sudo apt install -y bison clang flex g++ gcc htop libreadline-dev \
llvm-6.0-dev make zlib1g-dev
curl -L https://iterm2.com/shell_integration/install_shell_integration_and_utilities.sh | bash
@hanefi
hanefi / .tmux.conf
Created April 18, 2018 06:14 — forked from paulodeleo/.tmux.conf
Tmux configuration to enable mouse scroll and mouse panel select, taken from: http://brainscraps.wikia.com/wiki/Extreme_Multitasking_with_tmux_and_PuTTY
# Make mouse useful in copy mode
setw -g mode-mouse on
# Allow mouse to select which pane to use
set -g mouse-select-pane on
# Allow mouse dragging to resize panes
set -g mouse-resize-pane on
# Allow mouse to select windows
@hanefi
hanefi / .tmux.conf
Created April 18, 2018 06:14 — forked from paulodeleo/.tmux.conf
Tmux configuration to enable mouse scroll and mouse panel select, taken from: http://brainscraps.wikia.com/wiki/Extreme_Multitasking_with_tmux_and_PuTTY
# Make mouse useful in copy mode
setw -g mode-mouse on
# Allow mouse to select which pane to use
set -g mouse-select-pane on
# Allow mouse dragging to resize panes
set -g mouse-resize-pane on
# Allow mouse to select windows