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 | |
git add . | |
git commit -m 'First commit' | |
git remote add origin remote repository URL | |
git remote -v | |
git pull origin master | |
git push origin master |
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
// Mongo configuration file | |
/etc/mongod.conf | |
// Start Mongo service | |
sudo service mongod start | |
// Check if Mongo is running, last line should be: "[initandlisten] waiting for connections on port 27017" | |
cat /var/log/mongodb/mongod.log | |
// Check if Mongo is running |
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
/* --------------------- Variables --------------------- */ | |
/* SCSS */ | |
$primary-color: #333; | |
body { | |
color: $primary-color; | |
} |
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
// --------------------------- create basic server --------------------------- \\ | |
var http = require("http"); | |
var myServer = http.createServer(function (request, response) { | |
response.writeHead(200, {"Content-type": "text/html"}); | |
response.write("<p><strong> hello </strong> batkan </p>"); | |
response.end(); | |
}); | |
myServer.listen(3000); |
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
// app.js ---------------------------------------------------- | |
'use strict'; | |
angular | |
.module('app', [ | |
'ngSanitize', | |
'ngAnimate', | |
'ngTouch', | |
'ui.bootstrap', |
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
// WARNING: Use with caution. Don't use when displaying user-created content. | |
app.filter('html', ['$sce', function ($sce) { | |
return function(t) { | |
return $sce.trustAsHtml(t) | |
} | |
}]); | |
// Usage | |
<span ng-bind-html="yourDataValue | html"></span> |
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
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => { | |
return [1, 2, 3]; |