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
#!/usr/bin/python | |
# -*- coding: utf8 -*- | |
""" | |
This is a port of Chris Veness' AES implementation: http://www.movable-type.co.uk/scripts/aes.html | |
Copyright ⓒ2005-2008 Chris Veness. Right of free use is granted for all | |
commercial or non-commercial use. No warranty of any form is offered. | |
Ported in 2009 by Markus Birth <markus@birth-online.de> | |
2018-02 by namh |
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
[MASTER] | |
# Specify a configuration file. | |
#rcfile= | |
# Python code to execute, usually for sys.path manipulation such as | |
# pygtk.require(). | |
init-hook='import sys; sys.path.append("c:/a/programming/python/spider_blogupdater/src"); | |
sys.path.append("c:/a/envs/spider3/Lib/site-packages"); | |
sys.path.append("c:/a/envs/spider3/Lib")' |
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
# coding=utf-8 | |
from rest_framework import exceptions | |
from rest_framework.authentication import BaseAuthentication, CSRFCheck | |
__author__ = 'namh' | |
class CsrfAuthentication(BaseAuthentication): | |
""" |
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
"""Production settings and globals.""" | |
from __future__ import absolute_import | |
from os import environ | |
from .base import * | |
# Normally you should not import ANYTHING from Django directly |
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
"""Common settings and globals.""" | |
from os.path import abspath, basename, dirname, join, normpath | |
from sys import path | |
########## PATH CONFIGURATION | |
# Absolute filesystem path to the Django project directory: | |
DJANGO_ROOT = dirname(dirname(abspath(__file__))) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- | |
vscode like theme by namh | |
--> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>vscode</string> | |
<key>settings</key> |
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
/** | |
Pure javascript instead of jQuery | |
code is from http://youmightnotneedjquery.com/ | |
*/ | |
/** | |
* to serialize the inputs' data of the {@param form} | |
*/ | |
const serialize = (fromEl)=>{ |
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 zipfile | |
import os, os.path | |
def unzip(filename, dest): | |
with zipfile.ZipFile(filename) as zf: | |
zf.extractall(dest) | |
def zipdir(newFilename, targetPath): |
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
+-----------+ +-----------+ | |
| | | | | |
| client | | server | | |
+-----------+ +-----------+ +-------------------------+ | |
+ + | global_message_buffer | | |
| |+----------------------------->| | | |
| POST button is clicked | +-----------+-------------+ | |
| uri: a/message/new | + |
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
/** | |
You could use this source for babel-react / babel-ecma6 | |
*/ | |
//-------------------------------- | |
// | |
// main.js | |
// | |
//-------------------------------- |