Skip to content

Instantly share code, notes, and snippets.

View inlanger's full-sized avatar
🍑

inlanger inlanger

🍑
View GitHub Profile
@runekaagaard
runekaagaard / list_all_model_signals.py
Last active July 4, 2022 15:41 — forked from voldmar/signals.py
List all signals by model and signal type. Tested with Django 1.7.
# coding:utf-8
import gc
import inspect
import ctypes
from collections import defaultdict
from django.core.management.base import BaseCommand
from django.db.models.signals import *
@diogok
diogok / OnlineUsers.php
Created May 4, 2011 19:48
Online Users using PHP and Redis
<?php
include 'predis/predis.phar';
class OnlineUsers {
/* time to consider user online */
private $minutes = 5 ;
function online() {
/* current hour and minute */