View postgres_util.sql
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
-- get last week first day and last week last day | |
SELECT | |
(to_date(concat(EXTRACT(YEAR FROM CURRENT_DATE),EXTRACT(week FROM CURRENT_DATE - '1 week' :: INTERVAL)),'iyyyiw'))::text AS start_date, | |
(to_date(concat(EXTRACT(YEAR FROM CURRENT_DATE),EXTRACT(week FROM CURRENT_DATE - '1 week' :: INTERVAL)),'iyyyiw') + 6)::text AS end_date | |
; |
View helloworld.py
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
def hello(): | |
print "Hello, GistBox!" |
View 0_reuse_code.js
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |