https://docs.google.com/presentation/d/1MiQeiPHEzenvHYzwueccZ0NLU9L1aYlxWNYXo7_TG6s/edit?usp=sharing
This file contains hidden or 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
| (defn string-to-int-list | |
| [string-list] | |
| (map read-string (str/split string-list #"\s|,"))) | |
| (defn string-calculator | |
| [numbers] | |
| (if (= numbers "") 0 | |
| (reduce + (string-to-int-list numbers)))) |
This file contains hidden or 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
| setw -g mode-mouse off | |
| set-option -g mouse-resize-pane off | |
| set-option -g mouse-select-pane off | |
| set-option -g mouse-select-window off | |
| set -g prefix C-a | |
| set -s escape-time 1 | |
| set -g base-index 1 | |
| setw -g pane-base-index 1 | |
| bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
| bind C-a send-prefix |
This file contains hidden or 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
| angular.module('myapp.services.usersettings', []) | |
| .factory('UserSettingsService', ['$q', '$http', function($q, $http){ | |
| return { | |
| getSettings: function(id) { | |
| var defer = $q.defer(); // A defer object that you control | |
| $http.get('some/url') | |
| .success(function(resp){ | |
| defer.resolve(data); | |
| }) |
This file contains hidden or 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
| python manage.py syncdb |
This file contains hidden or 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
| export HOME=/app | |
| for file in /app/.profile.d/*; do source $file; done | |
| hash -r | |
| cd /app # This is the folder where django app got deployed |
This file contains hidden or 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
| docker images # See a listing of all of your docker images | |
| docker run -i -t app/myapp /bin/bash # Start an interactive terminal inside of your container |
This file contains hidden or 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 remote add dokku [email protected]:myapp | |
| git push dokku master |
This file contains hidden or 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
| dokku postgresql:create myapp |
This file contains hidden or 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
| cd /var/lib/dokku/plugins | |
| git clone https://github.com/Kloadut/dokku-pg-plugin | |
| dokku plugins-install |
NewerOlder