- Select a particular experience to pursue.
- Pursue that experience to completion. (Achievement unlocked!)
- Reflect on that experience. Really soak it in. To get the most out of each achievement, you owe it to yourself to pause and reflect on the experience before you move on to the next one. Introspect. Ask yourself what you learned. Take the time to write down those thoughts. And even better still, share them with someone else and see how your learnings compare to other people who've also earned this achievement.
- Return to Step 1, this time selecting a new experience.
Live as if you were to die tomorrow. Learn as if you were to live forever'~
Brick walls are there for a reason. They show you how much you want to climb over the wall and achieve that goal.
Creativity is just connecting things. When you ask creative people how they did something, they feel a little guilty because they didn’t really do it, they just saw something.
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
#author: Davit Khaburdzania | |
#email: davit.khaburdzania@gmail.com | |
#github: github.com/davit-khaburdzania | |
fs = require "fs" | |
mongojs = require "mongojs" | |
db = mongojs 'mongodb://db_address', ['airports'] | |
#countries in europe | |
eu_countries = ["austria", "belgium", "bulgaria", "cyprus", "czech republic", "denmark", "estonia", "finland", "france", "germany", "greece", "hungary", "ireland", "iceland", "italy", "latvia", "lithuania", "luxembourg", "malta", "netherlands", "norway", "poland", "portugal", "romania", "slovakia", "slovenia", "spain", "sweden", "switzerland", "united kingdom"] |
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
## searching with regular expressions | |
you can use regular expressions while searching for something ex: | |
db.airports.find(name: {$regex: "[^\s]paris", $options: "i"}) | |
this regex matches every document in airports collections whichs name start with paris | |
or include whitespace character and then paris. but this will't work as expected because | |
in strings \ character works as escape character so we need to excape it too | |
this will work as expected: | |
db.airports.find(name: {$regex: "[^\\s]paris", $options: "i"}) |
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
survey = require __dirname + "/../models/survey" | |
## survey routes | |
exports.all = (req, res) -> | |
survey.all (err, surveys) -> | |
res.render "index", surveys: surveys or [] | |
exports.survey_get = (req, res) -> | |
id = req.params.id | |
survey.one id, (err, survey) -> |
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
about writing | |
--------------- | |
Write 50 words. That's a paragraph. | |
Write 400 words. That's a page. | |
Write 300 pages. That's a manuscript. | |
Write every day. That's a habit. | |
Edit and rewrite. That's how you get better. | |
Spread your writing for people to comment. That's called feedback. | |
Dont worry about rejection or publication. That's a writer. | |
When not writing, read. Read from writers better than you. Read and Perceive. |
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
==================================================================================== | |
````f = function(){ | |
return | |
true | |
} | |
console.log(f()) | |
/* | |
javascript always inserts line break after return and break | |
*/ |
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
⌘ + , => open pereference of application | |
⌘ + ⇧ + G => get a location bar from which you can directly type in the directory to go to | |
⌘ + I => Info window shows for the selected item. | |
⌘ + ⇧ + 4 + space => take screenshoot of choosen window | |
echo "Helloo" | pbcopy => copy a String to clipboard |
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
//1. returned values | |
(function () {}) === (function () {}) // ==> | |
(function () {}) == (function () {}) // ==> | |
(function () {}) == (function () {})() // ==> | |
(function () {})() == (function () {})() // ==> | |
(function () {})() === (function () {})() // ==> | |
(function () {})() == undefined // ==> | |
(function () {})() == null // ==> | |
null === (function () {})() // ==> | |
(function () {})() === undefined // ==> |
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 Promise () { | |
var fail,then, instance, thenCb, failCb, self = this; | |
self.resolve = function (data) { | |
if (thenCb) { | |
thenCb(data); | |
} | |
}; | |
self.reject = function (error) { | |
if (failCb) { |
OlderNewer