Hodně lidí v Pythonu používá unittest, což je modul ze standardní knihovny,
který lidem umožňuje rychle vytáhnout nějaký ten XUnit způsob psaní testů
plný class TestNěco, self.assertTamto() a setUp/tearDown tohleto. Když
je testů víc, běžně si k tomu vytáhnou nějaký namakanější test runner, třeba
nose. Test runner je něco, co umí inteligentně spouštět testy - např. jen ty,
které od posledně selhaly, ale těch užitečných funkcí je tam víc.
Protože nose testy spouští, umožňuje vyběhnout z XUnit stylu a nabízí spoustu
dalších triků, které ale nikdo nepoužívá, protože o nich neví. V zásadě ale
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
| { | |
| "AWSTemplateFormatVersion" : "2010-09-09", | |
| "Resources" : { | |
| "GithubServiceTopic" : { | |
| "Type" : "AWS::SNS::Topic", | |
| "Properties" : { | |
| "DisplayName" : "Topic for Github pull request integration", | |
| "Subscription" : [ | |
| { |
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
| install_selenium_server_standalone() { | |
| local desired_version=${1:-latest} | |
| # Create our shell user | |
| init_shell_user "selenium" "*" | |
| local selenium_download_site="http://selenium-release.storage.googleapis.com" | |
| local selenium_releases=$(curl --silent --show-error "$selenium_download_site" | grep --only-matching --perl-regexp '[0-9\.-\w]+?/selenium-server-standalone.*?\.jar' | sort --reverse) | |
| if [ "$desired_version" == "latest" ]; then |
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
| <?php | |
| /** | |
| * Zend Framework | |
| * | |
| * LICENSE | |
| * | |
| * This source file is subject to the new BSD license that is bundled | |
| * with this package in the file LICENSE.txt. | |
| * It is also available through the world-wide-web at this URL: | |
| * http://framework.zend.com/license/new-bsd |
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
| #!/bin/bash | |
| # pdfScale.sh | |
| # | |
| # Scale PDF to specified percentage of original size. | |
| # Ref: http://ma.juii.net/blog/scale-page-content-of-pdf-files. | |
| echo "This script doesn't handle files with spaces in them." | |
| SCALE=0.95 # scaling factor (0.95 = 95%, e.g.) |
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
| # | |
| ## | |
| # logging platform/build | |
| ## | |
| # | |
| 9cc93738aeb5723e8f9d502e7ac6210c6f6d4073 "LRX22C" | |
| ff8b5b19bed47660bcc6319a73b5b78d1e6dacda "LRX22B" | |
| ced3fdcfa3d576fc42a6a8ad2ff0114af5643255 "LRX21Z" | |
| 205c1f8aa4429f742e768199c84ab5f4877b51ab "LRX21Y" | |
| 4eab14a6ac5d9deafef778c7bf65f72e130cb2b3 "LRX21X" |
- For Gummiboot, EFI must be enabled in the bios setup BEFORE YOU START the installation process. It will yell at you if this is not enabled.
- If you do not have UEFI, it may be easier to use rEFInd or Grub2
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
| # Install ARCH Linux with encrypted file-system and UEFI | |
| # The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
| # Download the archiso image from https://www.archlinux.org/ | |
| # Copy to a usb-drive | |
| dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
| # Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
| # Set swedish keymap |
HTTP provides two ways for servers to control client-side caching of page components:
- freshness may be based on a date or a token whose meaning is app-specific
- whether or not the client needs to confirm the cached version is up-to-date with the server
This breaks down as follows:
- Cache locally and don't check before using.
NewerOlder