Skip to content

Instantly share code, notes, and snippets.

@tomfa
tomfa / signals.py
Last active November 16, 2023 00:29
Django Elasticsearch with Celery
from celery import shared_task
from django.db import models, transaction
from django.utils import timezone
from django_elasticsearch_dsl.apps import DEDConfig
from django_elasticsearch_dsl.registries import registry
from django_elasticsearch_dsl.signals import BaseSignalProcessor
from .. import utils
@AllThingsSmitty
AllThingsSmitty / script-loaded.js
Created May 5, 2015 13:25
Check if any given script has loaded
var myScript = document.createElement('script');
myScript.src = 'http://code.jquery.com/jquery-2.1.4.min.js';
myScript.onload = function() {
console.log('jQuery loaded.');
};
document.body.appendChild(myScript);