- All the examples below assume the user's timezone is US/Central.
Activity.objects(device="sausages")
""" | |
How Django generates SECRET_KEYs for new Django projects. | |
See: | |
https://github.com/django/django/blob/1.7.1/django/core/management/commands/startproject.py#L27 | |
""" | |
from django.utils.crypto import get_random_string | |
# Create a random secret_key |
# AWS Version 4 signing example | |
# EC2 API (DescribeRegions) | |
# See: http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html | |
# This version makes a GET request and passes the signature | |
# in the Authorization header. | |
import sys, os, base64, datetime, hashlib, hmac | |
import requests # pip install requests |
#!/bin/bash | |
# For more info: https://help.ubuntu.com/community/UbuntuTime#Time_Synchronization_using_NTP | |
ntpdate ntp.ubuntu.com |
For help on interpreting see this reference.
db.activity.find({"device": "sausages"}).explain()
{
<?xml version="1.0" encoding="utf-8" standalone="yes"?> | |
<!DOCTYPE recoIndex PUBLIC "SYSTEM" | |
"http://xml.evernote.com/pub/recoIndex.dtd"> | |
<recoIndex docType="unknown" objType="image" | |
objID="5f5306f6cda9364ef734165ecaa43d31" engineVersion="6.5.17.7" | |
recoType="service" lang="en" objWidth="534" objHeight="778"> | |
<item x="173" y="133" w="80" h="22"> | |
<t w="78">Welcome</t> | |
<t w="46">Wei come</t> | |
<t w="42">Wei came</t> |
var _ = require("underscore"); | |
// A 2-dimensional array of jokes | |
var jokes = _.shuffle( | |
[ | |
[ | |
"Why did Santa's helper see the doctor?", | |
"Because he had a low \"elf\" esteem!\n" | |
], | |
[ |