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
/* | |
* Copyright 2012 Roman Nurik | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
<!DOCTYPE> | |
<html> | |
<head> | |
<title>Dissecting Gmail's Email Attachments - Dropping Files</title> | |
<style> | |
.msg { | |
display: none | |
} | |
.dragging .msg { |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://npmjs.org/install.sh | sh |
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
/* | |
* Whole module based on https://github.com/filamentgroup/loadCSS library | |
*/ | |
/* | |
* Object with all css file hrefs with proper hash for cache invalidation, | |
* for all pages, made by Gulp from manifest.json at build time. | |
*/ | |
import { css } from "./manifest-json/css.js"; |
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 django.forms import ModelForm | |
from django.forms.models import inlineformset_factory | |
from models import Sponsor, Sponsorship | |
class SponsorForm(ModelForm): | |
class Meta: | |
model = Sponsor |
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
<toolSet name="External Tools"> | |
<tool name="flake8 File" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="true" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="/usr/bin/flake8" /> | |
<option name="PARAMETERS" value="--max-line-length=160 --ignore=E501,E128 --exclude=migrations $FileDir$/$FileName$" /> | |
<option name="WORKING_DIRECTORY" value="$FileDir$" /> | |
</exec> | |
<filter> | |
<option name="NAME" value="Flake8 Output Filter" /> | |
<option name="DESCRIPTION" /> |
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
<!-- Drop this in ~/Library/Preferences/PyCharm20/tools --> | |
<!-- make sure you set the path to flake8 executable for your machine in the COMMAND option --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<toolSet name="Flake8"> | |
<tool name="Flake8 File" showInMainMenu="true" showInEditor="true" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="true" synchronizeAfterRun="true"> | |
<exec> | |
<option name="COMMAND" value="/usr/local/share/python/flake8" /> | |
<option name="PARAMETERS" value="--max-line-length=120 --ignore=E301,E302,E261,E262,W404 $FileDir$/$FileName$" /> | |
<option name="WORKING_DIRECTORY" value="$FileDir$" /> |
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
# https://bitbucket.org/yml/dj_tornado/src/c9a11ce11d4c/dj_tornado.py | |
import sys | |
import os | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.web | |
# django settings must be called before importing models |
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 concurrent.futures import ThreadPoolExecutor | |
from datetime import timedelta | |
from tornado import gen | |
from tornado.concurrent import run_on_executor | |
THREADPOOL_MAX_WORKERS = 10 | |
THREADPOOL_TIMEOUT_SECS = 30 | |
def onthread(function): |
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
--- my.cnf for 5.6.35 | |
[mysqld] | |
sql_mode=no_engine_substitution,no_unsigned_subtraction | |
default_tmp_storage_engine=MyISAM | |
tmpdir=/data/m/my | |
query_cache_size=0 | |
query_cache_type=0 | |
long_query_time=5 | |
log_bin=/data/m/my/binlogs/bl |
OlderNewer