-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
182 lines (126 loc) · 8.85 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Nathan Scully]]></title>
<link href="http://nathanscully.github.com/atom.xml" rel="self"/>
<link href="http://nathanscully.github.com/"/>
<updated>2013-04-02T21:41:20+11:00</updated>
<id>http://nathanscully.github.com/</id>
<author>
<name><![CDATA[Nathan]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[A new language]]></title>
<link href="http://nathanscully.github.com/blog/a-new-language/"/>
<updated>2013-03-16T18:00:00+11:00</updated>
<id>http://nathanscully.github.com/blog/a-new-language</id>
<content type="html"><![CDATA[<p>After having a few moments over the last few months of ‘I need to learn something new’ - I have decided to teach myself a new language/technology.</p>
<p>According to the internet I need to be learning… well, I just end up confused. Scala, clojure, ruby(well Ruby On Rails for something useful), javascript, functional, JVM based - it just gets silly. To make life simpler, I bit the bullet and just picked one that sounded interesting and I am going to stick with it and try a few projects. Then pick another and try and recreate the projects or just move onto new ones.</p>
<p>Node.js took my fancy - purely because I have used javascript in the past, I am interested in web applications and it just sounds like a different way of thinking than I am used to. I started a couple of helloworld tutorals and I have decided to stick to it(even though you see posts about [how terrible node.js is(http://dev.hasenj.org/post/31042963934/nodejs-hate)]).</p>
<p>Will it be the language of the future - maybe, javascript is pretty useful across both web and now thanks to node.js, the server. I really want to get into Google’s language <a href="www.golang.org">Go</a> - but that will be later!</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Nodepad - Node.js Appliction]]></title>
<link href="http://nathanscully.github.com/blog/nodepad-node-dot-js-appliction/"/>
<updated>2013-03-16T17:51:00+11:00</updated>
<id>http://nathanscully.github.com/blog/nodepad-node-dot-js-appliction</id>
<content type="html"><![CDATA[<h2>Introduction:</h2>
<p>With my new motivation(and commitment) to learn Javascript - specifically the <a href="www.nodejs.org">node.js</a> platform I have been hunting for a few tutorials.</p>
<p>After completing some basic helloworld I found <a href="www.dailyjs.com">daily.js</a> and their <a href="http://dailyjs.com/2010/11/01/node-tutorial/">nodepad</a> application.</p>
<p>It was written a few years ago and is now out of date with versions, and likely syntax so I am going to go through the tutorial and write my own version. All credits to dailyjs for the original material.</p>
<p>Nodepad will be a simple web based notepad application built using node.js and taking advantage of the express framework</p>
<h2>Requirements:</h2>
<ul>
<li>Node.js - an obvious requirement!</li>
<li>MongoDB - a NoSQL database thats getting a good wraps across the interwebs</li>
<li>NPM - Node package manager - used to install and manage any additonal packages we require.</li>
</ul>
<h2>Setup:</h2>
<p>Make a new working directory:</p>
<pre><code>mkdir nodepad
</code></pre>
<p>Install express</p>
<pre><code>npm install -g express
</code></pre>
<p>The -g flag installs this globally, allowing us to setup a skeleton application:</p>
<pre><code>express nodepad
</code></pre>
<p>Change into the nodepad directory and install the dependencies</p>
<pre><code>npm install
</code></pre>
<p>Update the package.json to include the required dependencies:</p>
<pre><code>{
"name": "nodepad",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node app"
},
"dependencies": {
"express": "3.1.0",
"jade": "*",
"less": "*",
"expresso": "*",
"mongoose": "*"
}
}
</code></pre>
<p>Run the skeleton application and view it on http://localhost:3000/:</p>
<pre><code>node app.js
</code></pre>
<p>Close the process and then setup a mongodb database:
in a new terminal start the mongodb server:</p>
<pre><code>mongod
</code></pre>
<p>connect via:</p>
<pre><code>mongo
</code></pre>
<p>Create a new nodepad db:</p>
<pre><code>use nodepad
</code></pre>
<h2>Application:</h2>
<p>Setup our first data model - we will use mongoose to wrap a class around our mongodb database. Save the following as models.js in the root of the nodepad folder.</p>
<pre><code>var mongoose = require('mongoose');
mongoose.model('Document', {
properties: ['title', 'data', 'tags'],
indexes: [
'title'
]
});
exports.Document = function(db) {
return db.model('Document');
};
</code></pre>
<p>We can now use the model via the following in our app.js file:</p>
<pre><code>db = mongoose.connect('mongodb://localhost/nodepad')
Document = require('./models.js').Document(db);
</code></pre>
<p>Be sure to add the mongoose dependency to the list of required modules:</p>
<pre><code>mongoose = require('mongoose');
</code></pre>
<p>Add the following config to our app.js. This will enable us to use less to complie our css</p>
<pre><code>app.configure(function(){
...
app.use(express.compiler({ src : __dirname + '/public', enable: ['less']}));
});
</code></pre>
<p>This completes the basic setup of our application. The next post will develop the application futher.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[And so it beings]]></title>
<link href="http://nathanscully.github.com/blog/and-so-it-beings/"/>
<updated>2013-03-16T15:15:00+11:00</updated>
<id>http://nathanscully.github.com/blog/and-so-it-beings</id>
<content type="html"><![CDATA[<p>I have been thinking about writing for a while. By ‘writing’ I mean dumping my thoughts and what I have been doing whilst consuming time.</p>
<p>This is a bit of a motivational project, self improvement even. I am dyslexic, so the thought of writing large chunks of text general makes me uncomfortable. But the more I write the better I get and the more succinct I am in conveying my thoughts.</p>
<p>I also am a scatter brain. I can focus and work for hours on end and forget what I started out trying to accomplish. The worst is when I work on something and find a useful tidbit of information that I want to reuse 3 months later but can’t for the life of me remember. This blog will server as a purpose to document and mamange my tidbits, and for me to have something to show myself what I have been working on. I think everyone needs to remind themsevles what they have accomplished - it is easy to only see what you havent finished, or even started.</p>
<p>Who am I? A 24 year old from Sydney, Australia. I studied Design Computing with the hopes of becoming an intermediary between Creative and Technical people. A sort of translator between someone who speaks colours and someone who speaks code. For the last 3 years I have been working for a small IT Consultancy company that develops and integrates software and systems around telecommunications and Contact Centres / Call Centres. My role is as a Application Designer/ Voice Consultant/Software Developer/SysAdmin/PreSales/Project Manager - basically just what needs to be done on the day. 90% of my work is developing IVRs(Interactive Voice Response) - Those hated telephone systems that ask you to press 1, press 2 or say what you want. The beauty of the IVRs I develop is that I have full end to end control of the scope, design, development, deployment and maintaince. You learn alot, and very very quickly.</p>
<p>I code in Java, I know - how uncool… Java does what I want it to do, all my clients are large enterprises (Banks generally) so Java plays very nice with their systems. But it is bloated, and the more I play with other languages(Scala/Javascript/Node.js/Rails/Ruby), I am realising there is so much more out there. I have experience in web lanaguages but I am starting to branch out and learn new things. All these languages/technologies are all getting me excited about creating things for myself, not just for a client.</p>
<p>I have set this blog up using <a href="www.octopress.org">Octopress</a>. This is a blog framework for <a href="http://github.com/mojombo/jekyll">Jekyll</a>. So far I love the concept - get rid of the web front end and silly post creation interfaces and just type the post in a text editor of choice. All this is pushed up to github which saves me worring about keeping me a copy and finding hosting.</p>
<p>I am hoping this easy format will encourage me to keep writing. I am going to start simple and document some tutorials and projects i will be working on. My goal is to really force myself to partake in ‘weekend’ projects - little apps that I can knock up in a few days.</p>
<p>And so it begins…</p>
]]></content>
</entry>
</feed>