pecl channel-update pecl.php.net
pecl clear-cache
pecl install xdebug
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 socket, traceback | |
HOST = '' | |
PORT = 51235 | |
CLRF = '\r\n' | |
class InvalidRequest(Exception): | |
pass | |
class Request(object): |
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 unittest | |
from flask import Flask | |
from flask.globals import _app_ctx_stack, _request_ctx_stack | |
class TestContext(unittest.TestCase): | |
def setUp(self): | |
self.app = Flask(__name__) |
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
{ | |
"name": "spakkionu/validate", | |
"description": "Validation Test", | |
"require": { | |
"illuminate/validation": "~4.2.9" | |
}, | |
"license": "MIT", | |
"authors": [ | |
{ | |
"name": "Jonathan Bernardi", |
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
[diff] | |
tool = pycharm | |
[difftool "pycharm"] | |
cmd = /usr/local/bin/charm diff "$LOCAL" "$REMOTE" && echo "Press enter to continue..." && read | |
[merge] | |
tool = pycharm | |
keepBackup = false | |
[mergetool "pycharm"] | |
cmd = /usr/local/bin/charm merge "$LOCAL" "$REMOTE" "$BASE" "$MERGED" |
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
@echo off | |
set "ROOT_DIR=E:\code\knowstory" | |
set "VIRTUAL_ENV=%ROOT_DIR%\env" | |
if defined _OLD_VIRTUAL_PROMPT ( | |
set "PROMPT=%_OLD_VIRTUAL_PROMPT%" | |
) else (#!E:\Python\python.exe | |
import re | |
import sys |
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
def to_sql(query, dialect_name=None): | |
from sqlalchemy import dialects | |
import operator | |
if dialect_name: | |
dialect_module = getattr(dialects, dialect_name) | |
if not dialect_module: | |
raise KeyError('Wrong dialect {}'.format(dialect_name)) | |
dialect = dialect_module.dialect() | |
else: |
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
STACKDRIVER_ERROR_FILE = '/var/log/app_engine/custom_logs/errors.log.json' | |
def log_stackdriver_err(request=None, exception=None, user=None): | |
''' | |
send error to StackDriver Error Reporting service | |
see https://cloud.google.com/error-reporting/docs/setup/app-engine-flexible-environment | |
''' | |
def make_path_to_file(filename): | |
if not os.path.exists(os.path.dirname(filename)): |
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
<?php | |
$the_folder = '.'; | |
$zip_file_name = '1.zip'; | |
$download_file= true; | |
//$delete_file_after_download= true; doesnt work!! | |
class FlxZipArchive extends ZipArchive { |
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
/* | |
* If you have | |
* .oneline { | |
* overflow: hidden; | |
* white-space: nowrap; | |
* text-overflow: ellipsis | |
* } | |
* | |
* inside Bootstrap's .media-body, i.g.: | |
* |
OlderNewer