This file contains hidden or 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
| # This is Git's per-user configuration file. | |
| [user] | |
| # Please adapt and uncomment the following lines: | |
| name = Adam Barnhard | |
| email = adam.barnhard@whereeveriwork.com | |
| [alias] | |
| # https://stackoverflow.com/a/39616600 utility to escape commands for aliases | |
| # quote-string = "!read -r l; printf \\\"!; printf %s \"$l\" | sed 's/\\([\\\"]\\)/\\\\\\1/g'; printf \" #\\\"\\n\" #" | |
| scrub = "!f(){ git scrubbranches && git prstashclean; };f" |
This file contains hidden or 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
| import sqlalchemy, sqlanydb | |
| from sqlalchemy import create_engine, Table, Column, Integer, Unicode, MetaData, String, Text, update, and_, select, func, types | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.orm import sessionmaker | |
| def connect(): | |
| return sqlanydb.connect(DSN='<your DNS>', userid='<username>', password='<password>') | |
| srcEngine = sqlalchemy.create_engine('sqlalchemy_sqlany://', creator=connect, echo=True) # pip install sqlalchemy-sqlany |
This file contains hidden or 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
| /* jshint expr:true, -W079 */ | |
| 'use strict'; | |
| var expect = require('chai').expect, | |
| cp = require('child_process'), | |
| h = require('../helpers/helpers'), | |
| server = require('../../server/index'), | |
| Lab = require('lab'), | |
| FormData = require('form-data'), |
This file contains hidden or 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
Show hidden characters
| { | |
| "requireCurlyBraces": [ | |
| "if", | |
| "else", | |
| "for", | |
| "while", | |
| "do", | |
| "try", | |
| "catch", | |
| "switch" |
This file contains hidden or 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
| { | |
| "camelcase": true, | |
| "curly": true, | |
| "eqeqeq": true, | |
| "forin": true, | |
| "immed": true, | |
| "indent": 2, | |
| "latedef": "nofunc", | |
| "newcap": true, | |
| "noarg": true, |
This file contains hidden or 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
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var bower = require('bower'); | |
| var concat = require('gulp-concat'); | |
| var sass = require('gulp-sass'); | |
| var minifyCss = require('gulp-minify-css'); | |
| var rename = require('gulp-rename'); | |
| var sh = require('shelljs'); | |
| var jade = require('gulp-jade'); | |
| var jshint = require('gulp-jshint'); |
This file contains hidden or 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
| CREATE OR REPLACE FUNCTION find_note(noteid integer) | |
| RETURNS TABLE("noteId" integer, "title" varchar, "body" text, "updatedAt" timestamp, "tags" varchar[]) AS $$ | |
| DECLARE | |
| BEGIN | |
| RETURN QUERY | |
| SELECT n.id AS "noteId", n.title, n.body, n.updated_at AS "updatedAt", array_agg(t.name) AS tags | |
| FROM notes n | |
| LEFT OUTER JOIN notes_tags nt ON n.id = nt.note_id | |
| LEFT OUTER JOIN tags t ON nt.tag_id = t.id | |
| WHERE n.id = noteid |
This file contains hidden or 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
| -- DROP FUNCTION find_user_notes(integer, integer); | |
| CREATE OR REPLACE FUNCTION find_user_notes(userid integer, lmt integer) | |
| RETURNS TABLE("noteId" integer, title character varying, body text, "updatedAt" timestamp without time zone, tags character varying[]) AS $$ | |
| DECLARE | |
| BEGIN | |
| RETURN QUERY | |
| SELECT n.id AS "noteId", n.title, n.body, n.updated_at AS "updatedAt", array_agg(t.name) AS tags | |
| FROM notes n | |
| LEFT OUTER JOIN notes_tags nt ON n.id = nt.note_id |
This file contains hidden or 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
| create table users( | |
| id serial primary key, | |
| username varchar(255) unique not null, | |
| password char(60) not null, | |
| avatar varchar(500) not null, | |
| created_at timestamp not null default now() | |
| ); | |
| create table notes( | |
| id serial primary key, | |
| title varchar(255) not null, |
This file contains hidden or 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
| { | |
| "camelcase": true, | |
| "curly": true, | |
| "eqeqeq": true, | |
| "forin": true, | |
| "immed": true, | |
| "indent": 2, | |
| "latedef": "nofunc", | |
| "newcap": true, | |
| "noarg": true, |
NewerOlder