Skip to content

Instantly share code, notes, and snippets.

Hacking through

Moti Korets motiko

Hacking through
View GitHub Profile
motiko / tech blogs
Last active Jul 19, 2019
Javascript and react
View tech blogs -- GoogleApps Google Script -- frontend (redux) -- Thai talks <3 -- Dan Abramov's blog --
View postgres_queries_and_commands.sql
-- 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%'
View gist:9753b205e6f0704e5d2af9a91a2951be

via (

  • za toggle a fold at the cursor (zo/zc)
  • zA toggle all folds at the cursor (zO/zC)
  • zm increases the foldlevel by one.
  • zM closes all open folds.
  • zr decreases the foldlevel by one.
  • zR decreases the foldlevel to zero -- all folds will be open.
  • zj moves the cursor to the next fold.
  • zk moves the cursor to the previous fold.
  • zf#j creates a fold from the cursor down # lines.
motiko / inde.html
Created Aug 8, 2015
Autoreload static HTML/JS/CSS
View inde.html
<script src=""></script>
View SFDC TZ Salesforce TimeZone Offset
// by Matt Lacey
string strOffset ='Z');
string strOffsetHours = strOffset.substring(0,3);
strOffsetHours = strOffsetHours.substring(1);