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
; on windows, this usually goes to c:\Users\MyLogin\.gitconfig | |
[alias] | |
st = status | |
ci = commit | |
co = checkout | |
br = branch | |
[color] | |
ui = true |
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
/** | |
* Return nearest bigger (by default, or lesser if the third parameter is true) to `value` number, which is multiple of `quant` | |
* @throws {Error} 'Illegal quantazing value' | |
* @param {Number} value | |
* @param {Number} quant must not be zero | |
* @param {Boolean} [toLower=false] return bigger rather than lesser nearest number | |
* @return {Number} | |
*/ | |
function quantize(value, quant, toLower) { | |
if (quant === 0) { |
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
# supposed you have default mpd.conf and have read comments in it | |
music_directory "/media/g/Music" | |
# mpd starts from `mpd` user. So create homedir for this user. | |
# also, don't forget to chown all this files to mpd | |
# well, you can change `user` setting below | |
playlist_directory "/home/mpd/pl" | |
db_file "/home/mpd/db" | |
log_file "/home/mpd/log" | |
pid_file "/home/mpd/pid" |
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
'use strict'; | |
var env = process.env.NODE_ENV || 'development'; // development by default | |
var config = {}; | |
try { | |
config = require('./local'); // local.js has priority | |
} catch (e) { | |
config = require('./' + env); // if local.js is not present, get config with environment name | |
} |
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 Konstantin Kitmanov <doctor.hogart@gmail.com> | |
* @license MIT | |
*/ | |
(function (root, factory) { | |
if (typeof define === 'function' && define.amd) { // AMD anonymous module | |
define([], factory); | |
} else if (typeof exports === 'object') { // NodeJS/CommonJS-like module | |
module.exports = factory(); |
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 Konstantin Kitmanov <doctor.hogart@gmail.com> | |
* @license MIT | |
*/ | |
(function (root, factory) { | |
if (typeof define === 'function' && define.amd) { // AMD anonymous module | |
define([], factory); | |
} else if (typeof exports === 'object') { // NodeJS/CommonJS-like module | |
module.exports = factory(); |
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 () { | |
var deg120 = Math.PI * 2/3; | |
var deg240 = Math.PI * 4/3; | |
var cos120 = Math.cos(deg120); | |
var sin120 = Math.sin(deg120); | |
var cos240 = Math.cos(deg240); | |
var sin240 = Math.sin(deg240); | |
/** | |
* Given center and radius of circumcircle, return points of triangle's vertices |
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
'use strict'; | |
var Backbone = require('backbone'); | |
var ModelAbstract = Backbone.Model.extend({ | |
/** | |
* Create calculatable properties. | |
* @example | |
* __autos__: { |
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 MainController(model) { | |
this.model = model; | |
} | |
MainController.prototype = { | |
findAll: function (req, res) { | |
res.send(200, this.model + '.find({})'); | |
}, | |
findById: function (req, res) { | |
res.send(200, this.model + '.findById(req.params.id)'); | |
}, |
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
root = true | |
[*] | |
end_of_line = lf | |
insert_final_newline = false | |
charset = utf-8 | |
indent_style = space | |
indent_size = 4 | |
trim_trailing_whitespace = true |
OlderNewer