Skip to content

Instantly share code, notes, and snippets.

View sagarkbhatt's full-sized avatar

Sagar Bhatt sagarkbhatt

  • Flipkart
  • India
View GitHub Profile
# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
@westonruter
westonruter / amp-gravity-forms-submission-shim.php
Last active November 18, 2022 19:54
AMP shim support for Gravity Forms submissions
<?php
/**
* AMP Gravity Forms Submission Shim plugin bootstrap.
*
* @package Google\AMP_Gravity_Forms_Submission_Shim
* @author Weston Ruter, Google
* @license GPL-2.0-or-later
* @copyright 2020 Google Inc.
*
* @wordpress-plugin
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active June 14, 2024 11:43
Useful PostgreSQL Queries and Commands
-- 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%'