updates
This commit is contained in:
@@ -65,44 +65,6 @@ angular.module('app.frontend')
|
||||
})
|
||||
.controller('EditorCtrl', function ($sce, $timeout, apiController, modelManager, markdownRenderer, $rootScope) {
|
||||
|
||||
this.demoNotes = [
|
||||
{title: "Live print a file with tail", content: "tail -f log/production.log"},
|
||||
{title: "Create SSH tunnel", content: "ssh -i .ssh/key.pem -N -L 3306:example.com:3306 ec2-user@example.com"},
|
||||
{title: "List of processes running on port", content: "lsof -i:8080"},
|
||||
{title: "Set ENV from file", content: "export $(cat .envfile | xargs)"},
|
||||
{title: "Find process by name", content: "ps -ax | grep <application name>"},
|
||||
{title: "NPM install without sudo", content: "sudo chown -R $(whoami) ~/.npm"},
|
||||
{title: "Email validation regex", content: "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$"},
|
||||
{title: "Ruby generate 256 bit key", content: "Digest::SHA256.hexdigest(SecureRandom.random_bytes(32))"},
|
||||
{title: "Mac add user to user tag", content: "sudo dsedittag -o edit -a USERNAME -t user GROUPNAME"},
|
||||
{title: "Kill Mac OS System Apache", content: "sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist"},
|
||||
{title: "Docker run with mount binding and port", content: "docker run -v /home/vagrant/www/app:/var/www/app -p 8080:80 -d kpi/s3"},
|
||||
{title: "MySQL grant privileges", content: "GRANT [type of permission] ON [database name].[table name] TO ‘[username]’@'%’;"},
|
||||
{title: "MySQL list users", content: "SELECT User FROM mysql.user;"},
|
||||
];
|
||||
|
||||
$timeout(function(){
|
||||
this.showSampler = !this.user.uuid && modelManager.filteredNotes.length == 0;
|
||||
|
||||
this.demoNoteNames = _.map(this.demoNotes, function(note){
|
||||
return note.title;
|
||||
});
|
||||
|
||||
this.currentDemoContent = {text: null};
|
||||
|
||||
this.prebeginFn = function() {
|
||||
this.currentDemoContent.text = null;
|
||||
}.bind(this)
|
||||
|
||||
this.callback = function(index) {
|
||||
this.currentDemoContent.text = this.demoNotes[index].text;
|
||||
}.bind(this)
|
||||
|
||||
this.contentCallback = function(index) {
|
||||
}
|
||||
}.bind(this), 100)
|
||||
|
||||
|
||||
this.setNote = function(note, oldNote) {
|
||||
this.editorMode = 'edit';
|
||||
if(note.content.text.length == 0) {
|
||||
|
||||
@@ -18,7 +18,7 @@ angular.module('app.frontend')
|
||||
console.log("Get user response", user, items);
|
||||
$scope.defaultUser = user;
|
||||
modelManager.items = items;
|
||||
$rootScope.title = "Notes — Neeto";
|
||||
$rootScope.title = "Notes — Standard Notes";
|
||||
onUserSet();
|
||||
} else {
|
||||
$scope.defaultUser = new User(apiController.localUser());
|
||||
|
||||
Reference in New Issue
Block a user