1.download repo of mxe
2.make needed targets
make MXE_TARGETS='x86_64-w64-mingw32.static i686-w64-mingw32.static' freeglut qt ...
- generate project
cmake . -DCMAKE_TOOLCHAIN_FILE=/cross/mxe/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake
| https://linuxcenter.kz/page/ustanavlivaem-ms-directx9x-v-wine | |
| user$ wget http://winetricks.org/winetricks | |
| user$ sh winetricks d3dx9 |
| openssl req -nodes -x509 -newkey rsa:2048 -keyout server.pem -out server.pem -days 1 && openssl s_server -tls1 -www -accept 1337 |
| class Singleton(type): | |
| _instances = {} | |
| def __call__(cls, *args, **kwargs): | |
| if cls not in cls._instances: | |
| cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) | |
| return cls._instances[cls] | |
| class Notifier(object): | |
| __metaclass__ = Singleton |
| .PHONY: all | |
| # https://gist.github.com/kostyll/e1bba8506c2cb08352fc | |
| # install git-crypt from https://github.com/AGWA/git-crypt.git | |
| REQFILE=requirements.txt | |
| TESTDUMMY=test/test_dummy.py | |
| GITATTRIBUTES=.gitattributes | |
| GITIGNORE=.gitignore | |
| KEY=key.bin |
| DIRS = . static/js/base64.coffee static | |
| COFFEE_SCRIPTS = $(basename $(foreach dir,$(DIRS),$(wildcard $(dir)/*.coffee))) | |
| #GEN_POPUPS := $(basename $(shell find data/ ! -name "html.py" -name "*.py")) | |
| CJXS_SCRIPTS = $(basename $(foreach dir,$(DIRS),$(wildcard $(dir)/*.cjsx))) | |
| PY_EXT=.py | |
| PYTHON=python | |
| CHDIR_SHELL := $(SHELL) | |
| define chdir | |
| $(eval _D=$(firstword $(1) $(@D))) |
| [Как варить гречку] | |
| http://www.timeboil.ru/cereals/buckwheat/ | |
| 1. Перед варкой гречку необходимо перебрать; важно, чтобы в готовую гречку не попали камушки и растительный мусор. | |
| 2. Промыть гречку под холодной водой и слить воду. | |
| 3. Разогреть сковородку, высыпать гречку, пару минут прогреть гречку на сковородке (без масла) на тихом огне, - тогда после варки она будет рассыпчатой. | |
| 4. Налить в кастрюлю холодной воды - в 2,5 раза больше, чем гречки: на 1 стакан гречки 2,5 стакана воды. Посолить воду. | |
| 5. Всыпать гречку в воду. | |
| 6. Поставить кастрюлю на тихий огонь, довести до кипения, добавить 1 чайную ложку сливочного масла. | |
| 7. Гречку варить на медленном огне, под крышкой, 20 минут. | |
| 8. Подавать гречку на гарнир со сливочным маслом и зеленью. |
| import signal | |
| import sys | |
| def sigterm_handler(_signo, _stack_frame): | |
| # Raises SystemExit(0): | |
| sys.exit(0) | |
| signal.signal(signal.SIGTERM, sigterm_handler) | |
| signal.signal(signal.SIGINT, sigterm_handler) |
1.download repo of mxe
2.make needed targets
make MXE_TARGETS='x86_64-w64-mingw32.static i686-w64-mingw32.static' freeglut qt ...
cmake . -DCMAKE_TOOLCHAIN_FILE=/cross/mxe/usr/i686-w64-mingw32.shared/share/cmake/mxe-conf.cmake
| # Originally from http://sharebear.co.uk/blog/2009/09/17/very-simple-python-caching-proxy/ | |
| # | |
| # Usage: | |
| # A call to http://localhost:80000/example.com/foo.html will cache the file | |
| # at http://example.com/foo.html on disc and not redownload it again. | |
| # To clear the cache simply do a `rm *.cached`. To stop the server simply | |
| # send SIGINT (Ctrl-C). It does not handle any headers or post data. | |
| import BaseHTTPServer | |
| import hashlib |
| """ | |
| A simple proxy server. Usage: | |
| http://hostname:port/p/(URL to be proxied, minus protocol) | |
| For example: | |
| http://localhost:8080/p/www.google.com | |
| """ |