This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Sample usage: http://localhost/convert/gist.github.com/gists/128733 --> | |
| <!-- Hardcoded charset bug to be sorted out yet --> | |
| <?php $f = file("http://".$_SERVER['QUERY_STRING']); ?> | |
| <?php header("Content-type: text/html; charset=cp1251"); ?> | |
| <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> | |
| <style> body { width: 320px !important; } nobr {white-space: normal !important; } dd { margin: 5px 10px;} </style> | |
| <?php echo implode($f, "") ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from widgets.duration import DurationField as FDurationField | |
| from widgets.duration import TimeDelta | |
| from django.db.models.fields import Field | |
| from django.core.exceptions import ValidationError | |
| from django.db import connection | |
| class DurationProxy(object): | |
| def __init__(self, field): | |
| self.field_name = field.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| $domain = GetHostByName($REMOTE_ADDR); | |
| if($_POST[submit1]) | |
| { | |
| $f="INSERT INTO vote SET id_img='".$_POST['img1']."',rating='".$_POST['num']."',ipname='$domain'"; | |
| $row=mysql_query($f); | |
| } | |
| else { echo "<b>click on vote!</b> or go back to <A HREF=http://agh.ge/form/vote/index.php>home page</A>";} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SendExceptionMiddleware(object): | |
| def process_exception(self, request, exception): | |
| """ | |
| Load exceptions into CrashKit | |
| Credits to wiz | |
| http://djangosnippets.org/snippets/1483/ | |
| """ | |
| try: | |
| env = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # from py2.6 distr | |
| # -*- coding: utf-8 -*- | |
| """ | |
| ast | |
| ~~~ | |
| The `ast` module helps Python applications to process trees of the Python | |
| abstract syntax grammar. The abstract syntax itself might change with | |
| each Python release; this module helps to find out programmatically what |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from random import * | |
| from math import * | |
| #GLOBAL VARIABLES | |
| cards = range(0,52) | |
| def randRange(in_lower, in_upper): | |
| temp_range = in_upper - in_lower | |
| return int(round((temp_range+0.5)*random() + (in_lower - 0.5))) |
NewerOlder