Skip to content

Instantly share code, notes, and snippets.

/*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/
"use strict";
var $protobuf = require("protobufjs/minimal");
// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
Ext.define('Batch', {
extend: 'Ext.data.Model',
fields: [
{name: 'prefix', type: 'string'},
{name: 'batch', type: 'string'},
{name: 'expires', type: 'string'}
]
});
var toolbar = Ext.create('Ext.toolbar.Toolbar', {
if (!empty($blogid) && strpos($_SERVER['HTTP_HOST'], 'beta') !== FALSE && strpos($_SERVER['HTTP_HOST'], 'XXXXXXX') !== FALSE && in_array($blogid, $GLOBALS['blocked_blogids'])) {
header('Location: XXXXXX');
exit;
}
if (empty($_SESSION['memberid'])) {
// Any URL that should be accessible without login must be listed here.
if (strpos($a, 'internal-') !== FALSE || $a == 'ajax-login-code' || $a == "ajax-adam-upload") {
// Do nothing, this is acceptable.
}
class DTColumnStylesByName(DTPluginBase):
def __init__(self, column_names=()):
self.column_names = column_names
def cell(self, callchain, data, column_index, column_name, row_number):
if column_name in self.column_names:
self.add_class(callchain.chain, ['light',])
def evaluvest_table(context, queryset, **kwargs):
<?php
error_reporting(E_ALL);
include('/data/servers/staff_weblogsinc_com/pages/lib/functions.php');
$sql = "SELECT blogid, postid, key_name, value
FROM key_value
WHERE 1
";
$pairs = get_all_rows($sql);
class DTCallback(DTPluginBase):
"""
This class executes a callback for fields that require it.
There is some super hacky shit making this work right now, as you can see in CELL. I should
probably work to remove this garbage.
"""
def __init__(self, callbacks, header_callbacks=None):
self.callbacks = callbacks
self.header_callbacks = header_callbacks
from django.contrib.admin.widgets import AdminFileWidget
from django import forms
from django.utils.translation import ugettext as _
from django.utils.safestring import mark_safe
from django.conf import settings
from PIL import Image
import os
try:
from sorl.thumbnail.main import DjangoThumbnail