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
{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' } | |
Error: read ECONNRESET | |
at exports._errnoException (util.js:746:11) | |
at TCP.onread (net.js:559:26) |
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
>>>> In-memory PM2 is out-of-date, do: | |
>>>> $ pm2 updatePM2 | |
In memory PM2 version: 0.14.0 | |
Local PM2 version: 0.12.16 | |
[PM2] Process app.js launched |
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
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"build-css": "cat public/css/global.css public/css/newLayout/*.css > public/css/style.css", | |
"build-js": "browserify public/js/newLayout/main.js > public/js/newLayout/bundle.js", | |
"build": "npm run build-css & npm run build-js", | |
"start": "npm run build && NODE_ENV=production pm2 start app.js", | |
"watch-css": "catw public/css/global.css public/css/newLayout/*.css -o public/css/style.css", | |
"watch-js": "watchify public/js/newLayout/main.js -o public/js/newLayout/bundle.js", | |
"watch": "npm run watch-css & npm run watch-js", | |
"start-dev": "npm run watch & nodemon app.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
export PS1="\u:\W –> " | |
export GITAWAREPROMPT=~/.bash/git-aware-prompt | |
source $GITAWAREPROMPT/main.sh | |
export PS1="\[$txtpur\][\!] \[$txtgrn\](\u) \[$bldred\]\w \[$bldpur\]\$\[$txtrst\]\[$txtrst\]\[$bldblu\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]" | |
export EDITOR='vim' | |
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting | |
PATH=$PATH:$HOME/bin |
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
select * from ( | |
select C3.ObjectId, C3.CategoryId, C3.CategorizationId, TheCount, | |
ROW_NUMBER() OVER (ORDER BY C3.ObjectId, C3.CategoryId, C3.Categorizationid desc) as RowNumber | |
from Categorization as C3 right outer join ( | |
select (select Code from Product where ProductId = ObjectId) as Code, C1.ObjectId, C1.CategoryId, ( | |
select count(*) from Categorization as C2 where C2.ObjectId = C1.ObjectId and C2.CategoryId = C1.CategoryId | |
) as TheCount | |
from Categorization as C1 | |
where (select count(*) from Categorization as C2 where C2.ObjectId = C1.ObjectId and C2.CategoryId = C1.CategoryId) > 1 | |
group by C1.CategoryId, C1.ObjectId |
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
async.waterfall([ | |
soap.createClient.bind(null, process.cwd() + '/util/usaepay.wsdl'), | |
function(client, cb) { | |
client.runSale(args, cb); | |
}, | |
function(result, body, cb) { | |
if (result.runSaleReturn.ResultCode.$value === 'E') { | |
return new Error('failed to process'); | |
} else if (result.runSaleReturn.ResultCode.$value === 'A') { | |
return cb(null, result); |
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
package data_structures; | |
import java.util.Iterator; | |
import java.util.NoSuchElementException; | |
import data_structures.*; | |
public class OrderedVector<E> implements Iterable<E> { | |
private E[] arr; | |
private int size; | |
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
package data_structures; | |
import java.util.Iterator; | |
import java.util.Arrays; | |
import java.lang.*; | |
public class OrderedVector<E> implements Iterable<E> { | |
private E[] arr; | |
private int size; | |
private static final int DEFAULT_MAX_CAPACITY = 2; |
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
CREATE TYPE feedback_type AS ENUM('rolloffs', 'waste', 'hauling', 'commerical', 'residential'); | |
CREATE TABLE IF NOT EXISTS company_feedback ( | |
id serial PRIMARY KEY, | |
company integer REFERENCES companies(id) NOT NULL, | |
ip text NOT NULL, | |
"type" feedback_type NOT NULL, | |
affirmative boolean NOT NULL | |
); |
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
CREATE TABLE IF NOT EXISTS items_industries ( | |
item integer REFERENCES items(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, | |
industry integer REFERENCES industries(id) ON DELETE CASCADE | |
); |