VirtualTam's bookmarks
270 bookmarks found
-
stefankoegl/python-json-pointer · GitHub
2015-09-23 Python implementation of JSON Pointer - RFC 6901
See:
-
Context: replace spaces by dashes in a script-generated HTML file's links
1awk -F\' 'm = /a href/ { gsub(/ /,'-',$2); print$1'\''$2'\''$3} !m {print $0}'
-
w3c-markup-validator
2015-04-13 Mercurial repository for the W3C Validator :-)
-
PHP - Testing your privates
2015-03-17 How to test a private or protected method with PHPUnit?
see also: https://sebastian-bergmann.de/archives/881-Testing-Your-Privates.html
-
Bigger than my head
2015-03-17 A friend of mine was once interviewing an engineer for a programming job and asked him a typical interview question:
- How do you know when a function or method is too big?
- Well, said the candidate, I don't like any method to be bigger than my head.
- You mean you can't keep all the details in your head?
- No, I mean I put my head up against my monitor, and the code shouldn't be bigger than my head.
~ from http://www.gigamonkeys.com/book/practical-a-simple-database.html
-
mkzombie
2015-03-15 This program creates one or more zombies and a daemon their leader. It can be used to replenish system zombies, or to feed the init monster.
-
SQLite Memo
2015-03-14 Common ops & clauses:
- CREATE TABLE - https://www.sqlite.org/lang_createtable.html
- ALTER TABLE - https://www.sqlite.org/lang_altertable.html
- UPDATE - https://www.sqlite.org/lang_update.html
-
Python unit testing frameworks: Nose, Pytest
2015-02-13 Python's built-in unittest module is quite cool, but a bit limited and way too verbose (read: it's quite not easy to incite developers to write unit tests)
I'm currently looking for more dev-friendly solutions, the key points being:
- writing test code should be easy and straight-forward -keep the focus on "what to test" instead of "how to transcribe a process to a test"
- parallelization! -we, spoiled developers, should make good use of our way-too-many-cores build machines...
- complete feature set!
- we don't want to just run tests...
- coverage reports (find dead/weak/untested code sections)
- output formatting (JUnit-XML seems to be quite a common format out there)
There seem to be 3 solutions in Python:
- stock unittest + project-dependent customizations / test helpers
- nosetests
- py.test
And 2 ways of gettings things done:
- keeping things stock: no external dependency, project-specific implementation...
- using a test framework: one more module in your (test) virtualenv, more concise tests, more features (// run, code coverage, etc.)
Some links:
-
Starting and Accessing Jenkins
2015-01-09 To increase the memory allocated and available:
# /etc/default/jenkins JAVA_ARGS="-Xms4G -Xmx16G -Djava.awt.headless=true"
See also
- Jenkins performance hints: http://soldering-iron.blogspot.com/2014/01/jenkins-performance-hints.html
- Java commandline options: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html
-
nose: python testing helper
2015-01-04 Includes support for Coverage, Xunit and other cool stuff ;-) Oh, and there is parallel testing, too \o/
nosetests --with-coverage --cover-erase --cover-tests --cover-html --cover-html-dir=htmlcov --with-xunit --xunit-file=unit.xml
via http://www.alexconrad.org/2011/10/jenkins-and-python.html
-
Dive Into HTML5
2014-11-30 -
Django Lint
2014-09-11