Skip to content

Instantly share code, notes, and snippets.

View hahla's full-sized avatar
💭
building $W

Michael Salmon hahla

💭
building $W
View GitHub Profile
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
-- This function replicates the functionality of \d table_name
-- It's useful if you work in a sql tool such as intelliJ, where \d does not work.
--- usage: select * from check_schema('table_name');
drop function check_schema(text);
CREATE FUNCTION check_schema(text)
RETURNS TABLE (f1 text, attname name, format_type text, substr text, attnotnull boolean, attnum smallint) AS $$
BEGIN
RETURN QUERY
SELECT $1 as f1, a.attname, pg_catalog.format_type(a.atttypid, a.atttypmod),
@hahla
hahla / Responsive-Bootstrap-3-Countdown-Timer.markdown
Created December 21, 2013 23:36
A Pen by Carrara Website Solutions.