This is a simplistic setup trying to emulate at least part of i3 behaviour on MacOS using yabai. Key-bindings are partially replicated due to the presence of MacOS built-in bindings
Start with installing (and understanding) following tools
| function getPathWithKey(path, key) { | |
| return typeof path === 'string' ? `${path}[${key}]` : key; | |
| } | |
| /** | |
| * Esta função converte um objeto plano com chaves aninhadas para | |
| * o formato esperado pelo URLSearchParams, que é utilizado nas requisições | |
| * que exige o "Content-Type": "application/x-www-form-urlencoded". | |
| * | |
| * Um objeto com estrutura |
| create table if not exists deps_saved_ddl | |
| ( | |
| deps_id serial primary key, | |
| deps_view_schema name, | |
| deps_view_name name, | |
| deps_ddl_to_run text | |
| ); | |
| create or replace function deps_save_and_drop_dependencies(p_view_schema name, p_view_name name) returns void as | |
| $$ |
This is a simplistic setup trying to emulate at least part of i3 behaviour on MacOS using yabai. Key-bindings are partially replicated due to the presence of MacOS built-in bindings
Start with installing (and understanding) following tools
| # How long it should wait between every loop in seconds | |
| $secondsToWait = 5 | |
| # The volume you want in percent (0.92 = 92%) | |
| $volume = 1.00 | |
| Write-Host "Starting invinite loop, press CTRL + C or close the window to stop" | |
| while (1) { | |
| Start-Process -FilePath "nircmd.exe" -WorkingDirectory $PSScriptRoot -ArgumentList "setsysvolume $([math]::floor(65535 * $volume))","default_record" -Wait | |
| Write-Host "Volume set to $($volume * 100)%" | |
| Start-Sleep -Seconds $secondsToWait |
| --- 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 |
| #!/bin/sh | |
| # It seems it's very hard to set resample output quality with Ghostscript. | |
| # So instead rely on `prepress` preset parameter to select a good /QFactor | |
| # and override the options we don't want from there. | |
| gs \ | |
| -o resampled.pdf \ | |
| -sDEVICE=pdfwrite \ | |
| -dPDFSETTINGS=/prepress \ |
| #!/usr/bin/env python | |
| import i3 | |
| outputs = i3.get_outputs() | |
| workspaces = i3.get_workspaces() | |
| # figure out what is on, and what is currently on your screen. | |
| workspace = list(filter(lambda s: s['focused']==True, workspaces)) | |
| output = list(filter(lambda s: s['active']==True, outputs)) |
| create table deps_saved_ddl | |
| ( | |
| deps_id serial primary key, | |
| deps_view_schema varchar(255), | |
| deps_view_name varchar(255), | |
| deps_ddl_to_run text | |
| ); | |
| create or replace function deps_save_and_drop_dependencies(p_view_schema varchar, p_view_name varchar) returns void as | |
| $$ |
Title: PostGIS 2.0 Cheatsheet CSS : css/cheaters.css
Permalink to PostGIS 2.0 Cheatsheet
| PostgreSQL PostGIS Geometry/Geography/Box Types |
|---|
| -- 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%' |