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
Angular | |
======= | |
var myApp = angular.module('myApp', []); | |
function serializeData( data ) { | |
if ( ! angular.isObject( data ) ) { | |
return( ( data == null ) ? "" : data.toString() ); | |
} |
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
qaApp.directive('qaAction', function () { | |
return { | |
restrict: 'E', | |
scope: {title: '@'}, | |
template: '<span style="color:blue">{$ action $}</span><br><br>', | |
scope: { | |
'action': '=' | |
} | |
} | |
}); |
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
qaApp.directive('qaAction', function () { | |
return { | |
restrict: 'E', | |
scope: {title: '@'}, | |
templateUrl: "action.html", | |
scope: { | |
'action': '=' | |
}, | |
controller: function ($http, $scope, $rootScope) { | |
} |
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.directive('upgrade1', function () { | |
return { | |
restrict: 'E', | |
templateUrl: "my_template.html", | |
scope: { | |
'info': '=info', | |
}, | |
controller: 'upgrade1', | |
} | |
}); |
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 a new user with permissions | |
1. Get the `super_admin_key` from `/etc/swift/proxy-server.conf` | |
2. Make sure your admin is working: | |
:::bash | |
swift -A https://<url>:8080/auth/v1.0 -U ADMIN_ACCOUNT:ADMIN_USER -K ADMIN_PASSWORD stat -v --insecure |
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 () { | |
window.app = angular.module('app', []); | |
}).call(this); | |
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
import time | |
import urllib2 | |
from datetime import datetime | |
def do_dave(): | |
while 10 < datetime.now().hour < 15: | |
time.sleep(5) | |
urllib2.urlopen('http://www.reddit.com/') | |
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
import ast | |
from django.db import models | |
class ListField(models.TextField): | |
__metaclass__ = models.SubfieldBase | |
description = "Stores a python list" | |
# We use this to store user pks on flags. | |
def __init__(self, *args, **kwargs): |
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
qaApp.filter('safe', function ($sce) { | |
return function (value) { | |
return $sce.trustAsHtml(value); | |
}; | |
}); | |
qaApp.filter('nl2br', function() { | |
return function(data) { | |
if (!data) return data; | |
return data.replace(/\n\r?/g, '<br />'); |
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
# Edit this file to introduce tasks to be run by cron. | |
# | |
# Each task to run has to be defined through a single line | |
# indicating with different fields when the task will be run | |
# and what command to run for the task | |
# | |
# To define the time you can provide concrete values for | |
# minute (m), hour (h), day of month (dom), month (mon), | |
# and day of week (dow) or use '*' in these fields (for 'any').# | |
# Notice that tasks will be started based on the cron's system |
OlderNewer