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
$ npm -v | |
node.js:201 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ | |
Error: No such module | |
at Object.<anonymous> (/usr/lib/node_modules/npm/lib/utils/config-defs.js:5:21) | |
at Module._compile (module.js:444:26) | |
at Object..js (module.js:462:10) | |
at Module.load (module.js:351:31) |
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
Ripped apart jsDoc stuff from http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml | |
Here's the best stuff you should know about: | |
/** | |
* @license MIT style, use however you wish. | |
* @fileoverview Some utilities. | |
* @author [email protected] (Devin Rhode) | |
*/ | |
/** |
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
<!-- | |
for AirPR.com's coming soon landing page, on a specific issue generally | |
applicable to anyone on the web looking to use this input & placeholder design | |
Problem: email placeholder text gets cut off with different zoom levels, | |
and surely mobile has some inconsistencies. Also, when you click in to type | |
an email, your cursor is overlapping the placeholder text | |
--> | |
<!-- Add this to the top of your code --> | |
<style type="text/css"> |
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 express app.js, remove all app.get routings, and put this: | |
app.get('*', function(req, res) { | |
file = req.params[0].substr(1, req.params[0].length); | |
console.log('requesting: ' + file); | |
res.render(file, {locals: { | |
request: req, | |
params: req.query | |
}}); //in your .jade file, variables request and params are available. | |
}) |
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
having problems with git with my node app on nodester (similar to heroku). | |
I did a force push to nodester, and I believe it merged my | |
server.js file with the starter server.js file, | |
resulting in an error on the <<<<<HEAD line git adds. | |
tried git push --force nodester master a few times, along with | |
git pull nodester master, and git fetch nodester master | |
What's more, when I do git fetch nodester master, I get: | |
* branch master -> FETCH_HEAD |
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
$ git init drtest | |
Initialized empty Git repository in /Users/rangetutoring/Desktop/drtest/.git/ | |
$ cd drtest | |
$ nodester app info devinrhode2 | |
nodester info Gathering information about: devinrhode2 | |
nodester info devinrhode2 on port 14777 running: true (pid: 4858) | |
nodester info gitrepo: [email protected]:/node/git/devinrhode2/......git | |
nodester info appfile: server.js | |
$ git remote add nodester [email protected]:/node/git/devinrhode2/.........git | |
$ git remote |
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
**Parker** | |
"Wtf do you do" | |
**Devin Rhode** | |
"That is a great question! This has been my task for the past week and... I'm either going to do a tech startup company... or probably work at stumbleupon, or another cooler company using making the rails for node (if they get funding). Or another company, who knows. Could work on walmart.com, this ad network, .... million jobs out in cali for programmers. | |
So, I don't know what I do. Day to day I've been learning a new framework/toolset for making web apps called Node.js. I need a job though. | |
Fun fact: after having a few lime chips you gave me during summer program, I've been buying them basically every time I go grocery shopping." |
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 your manifest.json, this is sample code for running a content script on 'document_start' | |
"content_scripts": [ | |
{ | |
"all_frames": false, | |
"js": [ "start.js", "main.js" ], | |
"matches": [ "*://*.domain.com/*" ], //over match urls, you can be more precise in start.js | |
"run_at": "document_start" | |
} | |
], |
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
body { | |
border-radius: 5px; //this auto expands to include -webkit- and -moz- border radii | |
//as you see, comments are more natural. | |
opacity: 0.5; //this auto-expands to include the IE filter, whatever it is. | |
} | |
//use a variable: | |
$color = gray; | |
/* |
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
I can either | |
1. Not give the frame top navigation permission, but ensure navigation occurs by intercepting requests, and making them occur in scout, in the frame. If the frame needs to take over the top frame, if can postMessage up and I can handle it intelligently. | |
2. Wrap all javascript in a spoofer, so it doesn't think it's in a frame. ...Still potentially has the issue of _top targeted links. onBeforeRequest can detect this, and point back to frame navigation. |
OlderNewer