This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
$$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SETLOCAL | |
GOTO:MAIN | |
REM | |
REM Info functions start | |
REM | |
REM Display version and copyright information | |
:VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Puts on glasses: | |
(•_•) | |
( •_•)>⌐■-■ | |
(⌐■_■) | |
Takes off glasses ("mother of god..."): | |
(⌐■_■) | |
( •_•)>⌐■-■ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set the base image to Debian | |
# https://hub.docker.com/_/debian/ | |
FROM debian:latest | |
# replace shell with bash so we can source files | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
# update the repository sources list | |
# and install dependencies | |
RUN apt-get update \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Include this at the very top of both your main and window processes, so that | |
// it loads as soon as possible. | |
// | |
// Why does this work? The node.js module system calls fs.realpathSync a _lot_ | |
// to load stuff, which in turn, has to call fs.lstatSync a _lot_. While you | |
// generally can't cache stat() results because they change behind your back | |
// (i.e. another program opens a file, then you stat it, the stats change), | |
// caching it for a very short period of time is :ok: :gem:. These effects are | |
// especially apparent on Windows, where stat() is far more expensive - stat() | |
// calls often take more time in the perf graph than actually evaluating the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su | |
# Java | |
yum -y install java-1.8.0-openjdk-devel | |
# Build Esentials (minimal) | |
yum -y install gcc gcc-c++ kernel-devel make automake autoconf swig git unzip libtool binutils | |
# Extra Packages for Enterprise Linux (EPEL) (for pip, zeromq3) | |
yum -y install epel-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Making promises | |
*/ | |
let okPromise = Js.Promise.make((~resolve, ~reject as _) => [@bs] resolve("ok")); | |
/* Simpler promise creation for static values */ | |
Js.Promise.resolve("easy"); | |
Js.Promise.reject(Invalid_argument("too easy")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[@bs.module "react-virtualized"] | |
external reactClass: ReasonReact.reactClass = "List"; | |
[@bs.deriving abstract] | |
type cellProps = { | |
index: int, | |
isScrolling: bool, | |
isVisible: bool, | |
key: string, | |
style: ReactDOMRe.Style.t, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"ocaml": "4.6.x", | |
"@opam/ocaml-lsp-server": "ocaml/ocaml-lsp:ocaml-lsp-server.opam" | |
}, | |
"resolutions": { | |
"@opam/dune": { | |
"source": "https://github.com/ocaml/dune/releases/download/2.5.1/dune-2.5.1.tbz#6c09f4d53e9169498ab017597c4343ceb00f6ead", | |
"override": { | |
"buildsInSource": true, |
OlderNewer