Skip to content

Instantly share code, notes, and snippets.

@monkbroc
monkbroc / Zend_Gdata_HttpClient.php
Created May 28, 2015 17:10
Zend 1 Gdata OAuthClient
<?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
@honzajavorek
honzajavorek / rant.md
Last active October 19, 2016 19:46
Testování v Pythonu a v JS

Testování v Pythonu a v JS

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

@jconstance-amplify
jconstance-amplify / Install_selenium.sh
Last active June 20, 2022 23:20
SeleniumConf 2017 Amplify Code Snippets
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
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources" : {
"GithubServiceTopic" : {
"Type" : "AWS::SNS::Topic",
"Properties" : {
"DisplayName" : "Topic for Github pull request integration",
"Subscription" : [
{