For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| // ---------------------------------------------------------- | |
| // A short snippet for detecting versions of IE in JavaScript | |
| // without resorting to user-agent sniffing | |
| // ---------------------------------------------------------- | |
| // If you're not in IE (or IE version is less than 5) then: | |
| // ie === undefined | |
| // If you're in IE (>=5) then you can determine which version: | |
| // ie === 7; // IE7 | |
| // Thus, to detect IE: | |
| // if (ie) {} |
| $ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/screen co screen | |
| $ curl http://old.evanmeagher.net/files/gnu-screen-vertsplit.patch > gnu-screen-vertsplit.patch | |
| $ cd screen/src | |
| $ patch < ../../gnu-screen-vertsplit.patch | |
| $ ./configure --enable-locale --enable-telnet --enable-colors256 --enable-rxct_osc | |
| $ make | |
| $ sudo make install |
| #!/usr/local/bin/python | |
| """Replacement for htpasswd""" | |
| # Original author: Eli Carter | |
| import os | |
| import sys | |
| import random | |
| from optparse import OptionParser | |
| # We need a crypt module, but Windows doesn't have one by default. Try to find |
| # -*- coding: utf-8 -*- | |
| import Image | |
| def resize_and_crop(img_path, modified_path, size, crop_type='top'): | |
| """ | |
| Resize and crop an image to fit the specified size. | |
| args: | |
| img_path: path for the image to resize. |
| index index.php index.html; | |
| root /your/path/to/the/sendy; | |
| location = / { | |
| index index.php; | |
| } | |
| location / { | |
| if (!-f $request_filename){ | |
| rewrite ^/([a-zA-Z0-9-]+)$ /$1.php last; |
| -- | |
| -- Estrutura da tabela `pais` | |
| -- | |
| CREATE TABLE IF NOT EXISTS `pais` ( | |
| `paisId` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, | |
| `paisNome` varchar(50) NOT NULL, | |
| `paisName` varchar(50) NOT NULL, | |
| PRIMARY KEY (`paisId`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=253 ; |
| // Remove the product rating display on product loops | |
| remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 ); |
| class Person (db.Document): | |
| name = db.StringField(required=True) | |
| created_date = db.ComplexDateTimeField(default=datetime.datetime.utcnow(), required=True) | |
| def to_dict(self): | |
| return helper.mongo_to_dict(self,[]) | |
| #helper.py | |
| def mongo_to_dict(obj, exclude_fields): |
Block encapsulates a standalone entity that is meaningful on its own.
While blocks can be nested and interact with each other, semantically they remain equal; there is no precedence or hierarchy.
Holistic entities without DOM representation (such as controllers or models) can be blocks as well.