Skip to content

Instantly share code, notes, and snippets.

@mrbaboon
mrbaboon / report_list.html
Created August 26, 2014 22:15
Issue with template & class object
...
<tbody>
{% for report in report_list %}
<tr>
<td>{{ report.name }}</td>
<td>{{ report.slug }}</td>
<td>test</td>
<td>
<a href="{% url 'reports:report_view' slug=report.slug %}">Run Report</a>
</td>
127.0.0.1 - - [17/Sep/2013:16:10:40 +0000] "GET /message/userStatusJSON HTTP/1.1" 200 2098
127.0.0.1 - - [17/Sep/2013:16:10:42 +0000] "GET /auth/touch?1379434242128 HTTP/1.1" 200 11
127.0.0.1 - - [17/Sep/2013:16:10:42 +0000] "GET /auth/touch?1379434242952 HTTP/1.1" 200 11
127.0.0.1 - - [17/Sep/2013:16:10:45 +0000] "GET / HTTP/1.1" 200 4214
127.0.0.1 - - [17/Sep/2013:16:10:45 +0000] "POST /rest/getInbox HTTP/1.1" 200 536
127.0.0.1 - - [17/Sep/2013:16:10:46 +0000] "GET / HTTP/1.1" 200 4214
127.0.0.1 - - [17/Sep/2013:16:10:46 +0000] "GET /message/userStatusJSON HTTP/1.1" 200 2098
127.0.0.1 - - [17/Sep/2013:16:10:47 +0000] "POST /rest/markMessageDelivered HTTP/1.1" 200 59
127.0.0.1 - - [17/Sep/2013:16:10:47 +0000] "GET /message/chatList?offset=0&to=&from=&publicStatus=&archived=false&_threadCheckAll=&_thread=&_thread=&message-subject=Telephone+Page&response=&max=12 HTTP/1.1" 200 711
127.0.0.1 - - [17/Sep/2013:16:10:47 +0000] "GET /message/chatPagerControls?count=1&offset=0&to=&from=&publicStatus=&archived=false&_
.directive('newMessageAlert', function(){
return function (scope, element, attrs) {
scope.$watch(attrs.unreadMessageCount, function () {
console.info("newMessageAlert", attrs);
element.stop()
.addClass("unread", {duration: 500})
.removeClass("unread", {duration: 500})
.addClass("unread", {duration: 500})
.removeClass("unread", {duration: 500});
@mrbaboon
mrbaboon / controller.js
Last active August 29, 2015 14:15
ui-select issue
$scope.fetchSearchableUsers = function (query) {
messageService.Contacts.get({name: query, allContacts: true, contactType: 'user'}, function(contacts){
$scope.searchableUsers = contacts.results;
});
};
@mrbaboon
mrbaboon / script.js
Last active August 29, 2015 14:21
adt
if(_.indexOf(permissionList, permission.name) == -1){
permissionList.push(someperm);
}
[
{
"_id": "55a0d0f6e67894f705c800f6",
"index": 0,
"guid": "ebe937a2-4e42-4ded-b975-2d0e6123ddc8",
"isActive": false,
"balance": "$1,956.25",
"picture": "http://placehold.it/32x32",
"age": 39,
"eyeColor": "green",
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.entity.mime.content.FileBody;
import org.apache.http.entity.mime.content.StringBody;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import raven
from .base import *
from smartpager.version import githash
ENVIRONMENT = 'staging'
SITE_URL = os.getenv('SITE_URL')
headers = {
'Content-Type': 'text/html',
'Connection': 'close, close',
'Cache-Control': 'no-cache',
'Content-Length': '210',
'X-Iinfo': '10-69561325-0 0NNN RT(1592837155246 83) q(0 -1 -1 -1) r(0 -1) B10(4,289,0) U2',
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload',
'Set-Cookie': 'visid_incap_2256536=YvKn8AVGTl+UVkSJDot+fCPE8F4AAAAAQUIPAAAAAABkg7TkrMo1925fV8qLhOEm; expires=Tue, 22 Jun 2021 07:49:14 GMT; HttpOnly; path=/; Domain=.prismahealth.org; Secure; SameSite=None, incap_ses_1229_2256536=NXAUaE7f03Zb7Oe+AUkOESPE8F4AAAAAc+wgVxe0GByMxu/PWEc3Vw==; path=/; Domain=.prismahealth.org; Secure; SameSite=None'
}