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
sudo npm install -g jitsu | |
jitsu login | |
vim package.json | |
{ | |
"name": "CHANGE_ME", | |
"subdomain": "CHANGE_ME", | |
"description": "CHANGE_ME", |
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="\[$(tput setaf 3)\] \u \[$(tput sgr0)\]at\[$(tput setaf 4)\] \H \[$(tput sgr0)\]in\[$(tput setaf 1)\] \W $ \n \[$(tput sgr0)\]" |
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
<cfouput> | |
<form method="POST"> | |
<input name="zipcode" type="number" placeholder="ZIP CODE" size="5" value="#(StructKeyExists(FORM,"zipcode") ? '#FORM.ZIPCODE#' : '')#"/> | |
<input type="submit" value="Search" /> | |
</form> | |
<cfif StructKeyExists(FORM,"zipcode") AND FORM.zipcode NEQ "" AND Len(FORM.zipcode) EQ 5> | |
<cfset theURL = "http://api.zippopotam.us/us/#FORM.zipcode#"> | |
<cfhttp url="#theURL#" method="get" result="response"></cfhttp> | |
<cfset temp = #DeserializeJSON(response.filecontent)#> |
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
function SendDate(date){ | |
// Expecting date as string like '2013-08-08' | |
var temp; | |
date = date.split('-'); | |
temp = new Date(date); | |
// Returns '2013-08-19T04:00:00.000Z' | |
return temp.toISOString(); | |
} |
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
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/app'); | |
var usrSchema = new mongoose.Schema({ | |
user: { type: String, required: true }, | |
password: { type: String, required: true }, | |
DLU: { type: Date } | |
}); | |
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
var $ = require('cheerio'), | |
_ = require('lodash'), | |
request = require('request'); | |
var url = 'http://www.themiamibikescene.com/search/label/stolen%20bike'; | |
request(url, function(err, resp, html){ | |
if(err){ | |
return console.log(err); | |
}; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
module.exports = function (PassportUserCredential) { | |
/* | |
* Check if credentials already exist for a given provider and external id | |
* Enable this hook if credentials can be linked only once | |
* | |
* @param Loopback context object | |
* @param next middleware function | |
* */ | |
PassportUserCredential.observe('before save', function checkPassportUserCredentials(ctx, next){ |
OlderNewer