Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font" > | |
<edit mode="assign" name="rgba" > | |
<const>none</const> | |
</edit> | |
</match> | |
<match target="font" > | |
<edit mode="assign" name="hinting" > |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
from celery.schedules import crontab | |
from flask.ext.celery import Celery | |
CELERYBEAT_SCHEDULE = { | |
# executes every night at 4:15 | |
'every-night': { | |
'task': 'user.checkaccounts', | |
'schedule': crontab(hour=4, minute=20) | |
} | |
} |
dhcpcd[8385]: version 5.6.4 starting | |
dhcpcd[8385]: eth0: sending IPv6 Router Solicitation | |
dhcpcd[8385]: eth0: rebinding lease of 10.100.91.89 | |
dhcpcd[8385]: wlan0: waiting for carrier | |
dhcpcd[8385]: eth0: acknowledged 10.100.91.89 from 10.100.56.21 | |
dhcpcd[8385]: eth0: checking for 10.100.91.89 | |
dhcpcd[8385]: eth0: Router Advertisement from fe80::783a:cf78:eef4:bf4a |
# Hello, and welcome to makefile basics. | |
# | |
# You will learn why `make` is so great, and why, despite its "weird" syntax, | |
# it is actually a highly expressive, efficient, and powerful way to build | |
# programs. | |
# | |
# Once you're done here, go to | |
# http://www.gnu.org/software/make/manual/make.html | |
# to learn SOOOO much more. |
[Mirrored from the archive.org copy of http://timelessrepo.com/json-isnt-a-javascript-subset – the timelessrepo unfortunately... isn't. — Ed]
Written by Magnus Holm.
From Wikipedia’s article on JSON:
JSON was based on a subset of the JavaScript scripting language.
All JSON-formatted text is also syntactically legal JavaScript code.
#!/bin/bash | |
# rluks.sh: Mount your encrypted LUKS drives by uuid over SSH | |
# Copyright (C) 2016+ James Shubin, AGPLv3+ | |
# Written by James Shubin <james@shubin.ca> | |
# You probably want to modify the following globals to match your needs... | |
SERVER='server.example.com' # expected server for running script | |
HOSTNAME='myserver' # expected hostname for running locally | |
MEDIA='/media/' # mount/media directory, eg: /media/ | |
declare -A MAP # create an associative array |
To merge exist migration files into one file:
django_migration
records table (manually)python manage.py migrate --fake
commandpython manage.py makemigrations
commandpython manage.py migrate --fake-initial
commandpython manage.py migrate contenttypes
command# POST a JSON file and redirect output to stdout | |
wget -q -O - --header="Content-Type:application/json" --post-file=foo.json http://127.0.0.1 | |
# Download a complete website | |
wget -m -r -linf -k -p -q -E -e robots=off http://127.0.0.1 | |
# But it may be sufficient | |
wget -mpk http://127.0.0.1 | |
# Download all images of a website |
Redis is Database whereas RabbitMQ was designed as a message router or message-orientated-middleware (mom), so I'm sure if you look for benchmarks, you'll find that RabbitMQ will outperform Redis when it comes to message routing.
RabbitMQ is written in Erlang which was specifically designed by the telecom industry to route messages, you get clustering out of the box due to it being written in Erlang which means in a clustered environment, RabbitMQ will outperform Redis even further.
Furthermore, you get guaranteed delivery of messages due to the AMQP protocol, in other words, if the network drops while consuming the message, the consumer won't be able to say thanks for the message, so the consumer will drop the message and Rabbit will requeue the message, if you publish a message and the queue didn't say thanks to the publisher due to network problems or timeouts, Rabbit will drop the message and the publisher will keep on trying to publish the message. You can have publish retries with backoff policies, so