Skip to content

Instantly share code, notes, and snippets.

View davit-khaburdzania's full-sized avatar
🎯
Focusing

Davit Khaburdzania davit-khaburdzania

🎯
Focusing
View GitHub Profile

Programming Achievements: How to Level Up as a Developer

  1. Select a particular experience to pursue.
  2. Pursue that experience to completion. (Achievement unlocked!)
  3. 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.
  4. Return to Step 1, this time selecting a new experience.
@davit-khaburdzania
davit-khaburdzania / quotes.md
Last active December 11, 2015 09:38
Steve Jobs About Creativity

Mahatma Gandhi

Live as if you were to die tomorrow. Learn as if you were to live forever'~

Randy Pausch

Brick walls are there for a reason. They show you how much you want to climb over the wall and achieve that goal.

Steve Jobs about creativity

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.

@davit-khaburdzania
davit-khaburdzania / airports.coffee
Last active December 13, 2015 19:59
better information about airports all over the world in json
#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"]
@davit-khaburdzania
davit-khaburdzania / note.txt
Last active December 13, 2015 20:38
mongoDB Notes
## 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"})
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) ->
@davit-khaburdzania
davit-khaburdzania / gist:5129060
Last active December 14, 2015 18:19
Some advices
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.
@davit-khaburdzania
davit-khaburdzania / quiz
Last active December 15, 2015 06:59
Javascript quizes
====================================================================================
````f = function(){
return
true
}
console.log(f())
/*
javascript always inserts line break after return and break
*/
@davit-khaburdzania
davit-khaburdzania / trickes.txt
Last active December 18, 2015 21:38
OS X features or tips and tricks
⌘ + , => 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
@davit-khaburdzania
davit-khaburdzania / questions.js
Created October 23, 2013 19:44
questions about Javascript questions
//1. returned values
(function () {}) === (function () {}) // ==>
(function () {}) == (function () {}) // ==>
(function () {}) == (function () {})() // ==>
(function () {})() == (function () {})() // ==>
(function () {})() === (function () {})() // ==>
(function () {})() == undefined // ==>
(function () {})() == null // ==>
null === (function () {})() // ==>
(function () {})() === undefined // ==>
@davit-khaburdzania
davit-khaburdzania / promises.js
Created November 17, 2013 08:38
simple promises implementation for fun
function Promise () {
var fail,then, instance, thenCb, failCb, self = this;
self.resolve = function (data) {
if (thenCb) {
thenCb(data);
}
};
self.reject = function (error) {
if (failCb) {