vim /usr/share/applications/google-chrome.desktop
Exec=/opt/google/chrome/google-chrome --incognito --disable-web-security--disable-web-security is the key.
| layout :set_layout | |
| def set_layout | |
| (request.xhr?) ? false : 'your_layout' # layout is false for ajax requests | |
| end |
| def switch_database | |
| Mongoid.override_database("amber1_admin_development") | |
| end | |
| def reset_database | |
| Mongoid.override_database(nil) | |
| end |
| app.factory('Session', function($http) { | |
| var Session = { | |
| data: {}, | |
| saveSession: function() { /* save session data to db */ }, | |
| updateSession: function() { | |
| /* load data from db */ | |
| Session.data = $http.get('session.json').then(function(r) { return r.data;}); | |
| } | |
| }; | |
| Session.updateSession(); |
| Скопируем ключ на наш рутер, исполюзуя scp: | |
| scp root@your-server.org:/etc/openvpn/static.key /etc/openvpn/static.key |
| progress: function (e, data) { | |
| var progress = parseInt(data.loaded / data.total * 100, 10); | |
| $('div.progress-bar', uploadProgressBlock).attr('data-pvalue', progress); | |
| }, |
| wBook.controller('Budget', ['$scope', '$http', 'FlashService' , function($scope, $http, FlashService) { | |
| $scope.cats = [{category: 'bride', title: 'Для невесты' } , {category: 'groom', title: 'Для жениха'} , {category: 'banquet', title: 'Банкет'}, {category: 'fun', title: 'Развлечения'},{category: 'decor', title: 'На оформление'}, {category: 'transport', title: 'На транспорт'}, {category: 'other', title: 'Прочее'}]; | |
| $scope.current_category = 'bride'; | |
| $scope.counts = []; | |
| $scope.totals = []; | |
| $scope.template = {}; | |
| $scope.flash = ''; | |
| $scope.topp = ''; | |
| $scope.url = window.location; | |
| $scope.inprogress = ''; |
| app.directive('changeTimeout', function() { | |
| return { | |
| require: 'ngModel', | |
| link: function(scope, elem, attr, ctrl) { | |
| if (!attr.ngChange) { | |
| throw new TypeError('ng-change directive not present'); | |
| } | |
| angular.forEach(ctrl.$viewChangeListeners, function(listener, index) { | |
| ctrl.$viewChangeListeners[index] = _.debounce(function() { |
| class Player | |
| def play_turn(warrior) | |
| if warrior.feel.empty? and warrior.health > 10 | |
| warrior.walk!(:forward) | |
| else | |
| if warrior.health < 10 | |
| #warrior.walk!(:backward) | |
| warrior.bind! | |
| else | |
| warrior.attack! |
| .colorgraph { | |
| margin-bottom: 7px; | |
| height: 5px; | |
| border-top: 0; | |
| background: #c4e17f; | |
| border-radius: 5px; | |
| background-image: -webkit-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); | |
| background-image: -moz-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); | |
| background-image: -o-linear-gradient(left, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37.5%, #f0776c 50%, #db9dbe 50%, #db9dbe 62.5%, #c49cde 62.5%, #c49cde 75%, #669ae1 75%, #669ae1 87.5%, #62c2e4 87.5%, #62c2e4); | |
| background-image: linear-gradient(to right, #c4e17f, #c4e17f 12.5%, #f7fdca 12.5%, #f7fdca 25%, #fecf71 25%, #fecf71 37.5%, #f0776c 37 |