This file contains 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
chflags nosunlnk php.ini; chflags noschg php.ini; replace "safe_mode = Off" "safe_mode = On" -- php.ini; replace "safe_mode_gid = On" "safe_mode_gid = Off" -- php.ini; replace "sql.safe_mode = On" "sql.safe_mode = Off" -- php.ini; chflags sunlnk php.ini; chflags schg php.ini |
This file contains 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
exim -bh IP |
This file contains 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
# settings.py | |
import os | |
rel = lambda *x: os.path.join(os.path.abspath(os.path.dirname(os.path.dirname(__file__))), *x) | |
gettext = lambda s: s | |
LANGUAGES = ( | |
('ru', gettext('Russian')), | |
('en', gettext('English')), | |
('lv', gettext('Latvian')), | |
) |
This file contains 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 django.conf.urls.i18n import i18n_patterns | |
from django.core.urlresolvers import reverse |
This file contains 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
void blendWithMask(cv::Mat &base, cv::Mat &src, cv::Mat &mask, cv::Mat &out){ | |
char ch = base.channels(); | |
double alpha = 0; | |
for( int y = 0; y < base.rows; y++ ){ | |
uchar* pBS = base.ptr<uchar>(y); | |
uchar* pSR = src.ptr<uchar>(y); | |
uchar* pMK = mask.ptr<uchar>(y); | |
uchar* pOU = out.ptr<uchar>(y); | |
for( int x = 0; x < base.cols*ch; x++ ){ | |
int ix = x / ch; |
This file contains 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
Resize terminal: | |
resize -s 25 80 | |
Test HDD speed: | |
dd if=/dev/zero of=zeros bs=1M count=500 oflag=direct; unlink zeros | |
dd if=/dev/zero of=zeros bs=64k count=16k conv=fdatasync; unlink zeros |
This file contains 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 Crypto.Cipher import AES | |
from Crypto import Random | |
import base64 | |
AESKEY = "jFa8*!9uiAS0!385&(lla$1dqae8#!da" | |
BS = 16 | |
pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS) | |
unpad = lambda s: s[0:-ord(s[-1])] |
This file contains 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
import inspect | |
def get_request(): | |
"""Walk up the stack, return the nearest first argument named "request".""" | |
frame = None | |
try: | |
for f in inspect.stack()[1:]: | |
frame = f[0] | |
code = frame.f_code | |
if code.co_varnames[:1] == ("request",): |
This file contains 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
http://www.zachtronics.com/kohctpyktop/kohctpyktop.htm | |
KT229: | |
eNrtmVsOgyAQRYHhxzV0C/3vWrr/jTQ8tLYylo7hpRdjTLyOcxjjBdTe7W166umh | |
rZJsCDxT4Bys/ws01u1qOZbPqJZMgoyiQOM3tRxFfdS5/dxWVUurqqXFqRH4WdUa | |
fURVUVVU9RRVfW/ZpnyJodxP5wzfvEpEyf246ppVbOJ2MsXGqLEbslgfyMaGW5eI | |
BTOY+2RO3D3kne3i+4IKtpS2wyy/hLpS3XOjBrFgBjOYG6qwyitYNJjBPCIzwSoH | |
fohuRZFeVZQdo3kRzGA+HXN0SoJVDjzeHVLjFxqJmsNMJdTwRUmk7s8NwAxmGscZ | |
YJV/qryflV0oZeRlbbZj5hHrDOZKzDTeArzMH6VuzXD3v57hJ3+//wk2UsEM5g6Z | |
DTOzDFTx9MaNmzlSplWm9+Nqn/NGYtYNhcf3jK83RWLBDOYWzP6CxJu2ypt4FVs5 | |
0gsHIMls |
OlderNewer