Skip to content

Instantly share code, notes, and snippets.

View bdunogier's full-sized avatar

Bertrand Dunogier bdunogier

View GitHub Profile
@bdunogier
bdunogier / .netrc
Created May 16, 2014 12:10
REST: Setting username & password for a host, for use with curl -n or HTTPie
# use admin/publish as the login/password for net requests to localhost
machine localhost login admin password publish
@henriquemoody
henriquemoody / phpunit.bash
Last active May 10, 2023 02:52
PHPUnit Bash Completion. sudo curl -L https://gist.githubusercontent.com/henriquemoody/5014805/raw/phpunit.bash -o /etc/bash_completion.d/phpunit && source /etc/bash_completion.d/phpunit
# Bash-Completion script for PHPUnit
#
# Created by Henrique Moody <henriquemoody@gmail.com>
#
_phpunit()
{
COMPREPLY=()
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
@bdunogier
bdunogier / createcontent.sh
Created October 19, 2012 13:42
A simple bash script that creates content over the eZ Publish 5 REST API v2 (http://github.com/ezsystems/ezpublish-community)
# Create & publish an ezdemo article using the eZ Publish 5 REST API v2
# Notes:
# - this script requires http ie, which can be found at https://github.com/jkbr/httpie
# - it temporarily depends on a few temporary fixes, available in my fork: https://github.com/bdunogier/ezp-next/tree/tmp-rest-fixes
# - it is NOT well written, and I suck at shell scripting. Feel free to submit improvements to the GIST ;)
#
# Author: Bertrand Dunogier <http://share.ez.no/community/profile>, twitter @bdunogier, http://gplus.to/BertrandDunogier
# Usage: run it
REST_URI="http://vm.ezpublish5/api/ezp/v2"
<?php
/**
* File containing the eZDatatypeTest class
*
* @copyright Copyright (C) 1999-2010 eZ Systems AS. All rights reserved.
* @license http://ez.no/licenses/gnu_gpl GNU GPLv2
* @package tests
*/
/**