Skip to content

Instantly share code, notes, and snippets.

@eyanq
eyanq / 0_reuse_code.js
Created May 23, 2014 02:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@eyanq
eyanq / helloworld.py
Created May 23, 2014 02:15 — forked from jookyboi/python_resources.md
Python-related modules and guides.
def hello():
print "Hello, GistBox!"
@eyanq
eyanq / postgres_util.sql
Created April 11, 2017 08:33
Useful PostgreSQL Queries
-- 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
;