Skip to content

Instantly share code, notes, and snippets.

View dxe4's full-sized avatar
🏃‍♂️
121.370125002420645918945532970499783

charalampos papaloizou dxe4

🏃‍♂️
121.370125002420645918945532970499783
View GitHub Profile
### Keybase proof
I hereby claim:
* I am dxe4 on github.
* I am dxe4 (https://keybase.io/dxe4) on keybase.
* I have a public key ASDGqLTNm9PbUi-XLS1D2FPsDoDVtZdsw_A7goyU7MwhPwo
To claim this, I am signing this object:
@dxe4
dxe4 / sql
Created October 9, 2018 09:29
postgresql locked queries
WITH _locks AS (
SELECT
PL.pid, unnest(pg_blocking_pids(PL.pid)) AS blocking_pid
FROM pg_locks PL
WHERE NOT granted
)
select
PSA.pid AS query_pid,
LEFT(query, 200) AS query,
CASE
@dxe4
dxe4 / server.R
Created March 9, 2017 17:32 — forked from jcheng5/server.R
Shiny example: Diamonds Explorer
library(shiny)
library(ggplot2)
shinyServer(function(input, output) {
dataset <- reactive({
diamonds[sample(nrow(diamonds), input$sampleSize),]
})
output$plot <- renderPlot({
@dxe4
dxe4 / index.html
Created November 14, 2015 12:36 — forked from d3noob/.block
Map using leaflet.js and d3,js combined
<!DOCTYPE html>
<html>
<head>
<title>Leaflet and D3 Map</title>
<meta charset="utf-8" />
<link
rel="stylesheet"
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"
/>
@dxe4
dxe4 / locate_pg_hba
Created November 7, 2015 10:13
locate pg_hba
psql -t -P format=unaligned -c 'show hba_file';
@dxe4
dxe4 / gist:10632647
Created April 14, 2014 09:40
Delete big files from git history
git filter-branch -f --force --index-filter 'git rm -rf --cached --ignore-unmatch folder/sub-folder' --prune-empty --tag-name-filter cat -- --all
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now
git gc --aggressive --prune=now
# http://stackoverflow.com/questions/2164581/remove-file-from-git-repository-history#answer-15526317