Skip to content

Instantly share code, notes, and snippets.

View dNitza's full-sized avatar
🫐

Daniel Nitsikopoulos dNitza

🫐
View GitHub Profile

Debugging index concurrent creation in Postgres.

Check if an index is still being created.

The following should return something if an index is still being created on another process.

SELECT 
  a.datname, 
  l.relation::regclass, 
export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
export ICUCFLAGS="-I$(brew --prefix icu4c)/include"
export ICULIBS="-L$(brew --prefix icu4c)/lib -licui18n -licuuc -licudata"
rtx install postgres@x.x
@dNitza
dNitza / fly.toml
Last active March 2, 2023 16:42
Hanami 2.0 fly.io config
app = "app-name"
kill_signal = "SIGINT"
kill_timeout = 5
[deploy]
release_command = "bin/hanami db migrate"
[env]
HANAMI_ENV="production"
@dNitza
dNitza / elasticsearch-upgrade-semaphore.sh
Last active March 16, 2020 21:58
Upgrade elasticsearch on semaphore
#!/bin/bash
###
# Script for uprading Elasticsearch to version 7.2.1
#
# Before running this script, please reset your dependency cache in Project Settings > Admin.
#
# Add the line below to your Setup commands in Project Settings (without the # at the beginning):
#
# wget https://gist.github.com/dNitza/8672749e99d52157e6821477ff64ba89/raw/elasticsearch-upgrade-semaphore.sh ; sudo bash elasticsearch-upgrade-semaphore.sh
@dNitza
dNitza / wwdc19sou.sh
Created June 4, 2019 10:05
Detect if WWDC19 Platforms State of the Union is available
#!/bin/bash
# Thanks to https://gist.github.com/alexeckermann/3f6a051e876e4c03e3b6341b7b05a7ad
# Execute this script to be notified when the WWDC 2019 Platforms State of the Union is available.
# Make sure this file is `chmod +x` to run in your Terminal.
while true
do

Keybase proof

I hereby claim:

  • I am dnitza on github.
  • I am nitza (https://keybase.io/nitza) on keybase.
  • I have a public key whose fingerprint is FABC 5631 46C3 D363 D067 2CE9 AE7E 8B6F 4449 6882
@dNitza
dNitza / gist:b2ac8833deee1197a927
Last active August 29, 2015 14:11
Prevent touch event when trying to scroll on touch enabled device
'use strict';
var App = App || {};
App.PhotoContainerView = Backbone.View.extend({
el: '.photos-container',
scrollY: 0,
@dNitza
dNitza / gist:5fd71ef77c4e2b948ed2
Last active August 29, 2015 14:11
Calculate distance from user given a lattitde and longitude
/* global App:false */
'use strict';
var Lib = Lib || {};
Lib.DistanceView = Backbone.View.extend({
latitude: 0,
@dNitza
dNitza / dimensions.scss
Created October 11, 2012 01:07
SCSS Mixin to replace width/height with dimensions
@mixin dimensions($width: auto, $height: auto) {
width: $width;
height: $height;
}