Skip to content

Instantly share code, notes, and snippets.

@O1O1O1O
O1O1O1O / useful_pg_queries.sql
Created November 12, 2019 21:36
Useful Postgres queries
-- List running queries
--
select query,* from pg_stat_activity;
-- Show cache hit ratio
--
SELECT
sum(heap_blks_read) as heap_read,
sum(heap_blks_hit) as heap_hit,
sum(heap_blks_hit) / (sum(heap_blks_hit) + sum(heap_blks_read)) as cache_hit_ratio
@O1O1O1O
O1O1O1O / regex.md
Last active May 4, 2018 05:37
regex to find possible entity names in a sentence

Here is a regular expression I created to identify Capitalized and ALLCAPS alphanumeric words that are not at the start of a sentence which may indicate they are proper names aka a pronoun. It uses a lookbehind ?<= to avoid matching words at the start of a sentence.

(?<=[\w,:;-])\s+([A-Z0-9]+[A-Za-z][A-Za-z0-9]*)\b

See it working at the handy website Regex101 - https://regex101.com/r/5haqtp/2

Regex101

@O1O1O1O
O1O1O1O / gist:59cc58995ab0886527685d8dff65a463
Created February 19, 2018 09:26
Blockstack Verification
Verifying my Blockstack ID is secured with the address 156EHDsWbvkWaHbhRXMCBRqkwQY31kfNLc https://explorer.blockstack.org/address/156EHDsWbvkWaHbhRXMCBRqkwQY31kfNLc

Keybase proof

I hereby claim:

  • I am o1o1o1o on github.
  • I am 0101010 (https://keybase.io/0101010) on keybase.
  • I have a public key ASDxJVQ2vYYJKgaTYyzEGCYcHkt6RfGRZ6zV32qhPWY36wo

To claim this, I am signing this object:

@O1O1O1O
O1O1O1O / bapg_info.md
Created July 18, 2016 21:16
Bay Area Paragliding useful information

Useful info for Bay Area Paragliding

This is a work in progress, feel free to create a pull-request!

Communication

We have a plethora of ways to get and stay in touch both official and unofficial so here's a list

Facebook

Google Groups

Voxer

Slack

Organisations

BAPA

@O1O1O1O
O1O1O1O / word_based_locations.md
Created July 15, 2016 07:02
Excerpt from my ideas notebook in 2006 describing a system for generating word based locations

051. Word based locations

Keywords: software, service, patent

Opportunity

This is an evolution of idea #043 with the realization that availability of GPS location will soon be almost universal to anyone with a cellphone, hand held computing device or laptop. The problem remains that the answer to the question "where are you" can still be a problem to communicate. Only a small percentage of the earth's surface can be accurately identified by a street address - for the rest we must rely on ad-hoc relative location such as "near the big tree a mile past the Foo exit of the freeway Bar". Or when off-road even more ad-hoc. The alternative is to revert to the use of the canonical latitude and longitude system. Unfortunately to locate some one accurately with latitude and longitude requires up to five decimal places of accuracy (1 meter resolution), combined with one to three leading digits each of latitude and longitude and a +/- or N/S E/W indicator. That makes for a lot of information to transfer probably

@O1O1O1O
O1O1O1O / Notes
Created March 28, 2014 06:40
Test gist...
+++ dasdads
'''' asdasd