I hereby claim:
- I am allixsenos on github.
- I am allixsenos (https://keybase.io/allixsenos) on keybase.
- I have a public key whose fingerprint is 2A2F 3C2A B502 941C B0F8 7E9B 6561 D338 82BC FA74
To claim this, I am signing this object:
| <?php | |
| ini_set("display_errors", 1); | |
| ini_set("error_reporting", E_ALL); | |
| echo "<pre>"; | |
| class MyException extends Exception { | |
| function __construct($message) { | |
| parent::__construct($message); | |
| $this->line = "42"; // this triggers it. if it's before the constructor, PHP freaks out regardless of xdebug |
| javascript:d=document;s=d.createElement('style');s.type='text/css';s.innerHTML=".post{-webkit-transition: all 5s ease-in-out; -moz-transition: all 5s ease-in-out; -o-transition: all 5s ease-in-out;}.post:hover{-webkit-transform: rotate(1800deg) scale(1); -moz-transform: rotate(1800deg) scale(1); -o-transform: rotate(1800deg) scale(1);}";d.getElementsByTagName('head')[0].appendChild(s); |
| javascript:var%20f='https://plusone.google.com/_/+1/confirm?url=',l=document.location,p=encodeURIComponent(l.href);a=function(){if(!window.open(f+p,'sharer','toolbar=0,status=0,resizable=1,width=470,height=330'))l.href=f+p;};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0);}else{a();}void(0); |
| <? | |
| /** | |
| * Pretty Errors | |
| * | |
| * ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### | |
| * | |
| * WARNING! It is downright _DANGEROUS_ to use this in production, on | |
| * a live website. It should *ONLY* be used for development. | |
| * | |
| * Pretty Errors allows the outside world to alter your project, |
| #!/usr/local/php5/bin/php | |
| <?php | |
| $files = glob('*/svi/*.html'); | |
| $fields = []; | |
| $fields['po'] = [ | |
| 'rbr', | |
| 'imeprezime', | |
| 'mjesto', |
| from django.db import connections | |
| from django.db.models.query import QuerySet | |
| from __future__ import print_function | |
| class QuerySetExplainMixin: | |
| def explain(self, analyze=True): | |
| cursor = connections[self.db].cursor() | |
| print(self.query) | |
| print() | |
| sql, params = self.query.sql_with_params() |
I hereby claim:
To claim this, I am signing this object:
| ''' | |
| Django bulk upsert | |
| Does not attempt to cover all corner cases and related models. | |
| Originally from http://people.iola.dk/olau/python/bulkops.py | |
| Heavily modified by Luka Kladaric [email protected] | |
| ''' | |
| from itertools import repeat | |
| from django.db import models, connections, transaction |
| USE phabricator_user; | |
| -- create LDAP mappings for unmapped users | |
| -- this query uses a subselect due to the way MySQL reacts to UUID() being | |
| -- wrapped in REPLACE() (returns the same UUID for all rows) | |
| -- WARNING: make sure user.userName maps to LDAP usernames, otherwise | |
| -- user_externalaccount.accountID needs to be modified for those users | |
| -- where it doesn't. alternatively, use Phabricator's change username | |
| -- utility in People app to change those users' usernames before running | |
| INSERT INTO user_externalaccount |