Skip to content

Instantly share code, notes, and snippets.

View bestform's full-sized avatar

Matthias Derer bestform

View GitHub Profile
package main
import (
"encoding/json"
"io/ioutil"
"net/http"
"os"
)
type SaveResponse struct {
package main
import (
"log"
"github.com/bestform/gohue"
)
func main() {
client := gohue.NewClient("USERNAME", "IP")
package main
import (
"log"
"math/rand"
"time"
"github.com/bestform/gohue"
)
--TEST--
Requiring a replaced package in a version, that is not provided by the replacing package, should result in a conflict
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{ "name": "foo/original", "version": "1.0.0", "replace": {"foo/replaced": "1.0.0"} },
{ "name": "foo/replaced", "version": "1.0.0" },
--TEST--
The locked version will not get overwritten by an install
--COMPOSER--
{
"repositories": [
{
"type": "package",
"package": [
{ "name": "foo/bar", "version": "1.0.0" },
{ "name": "foo/baz", "version": "1.0.0" },
<?php
namespace ChameleonSystem\ElasticsearchBundle\Document;
use ONGR\ElasticsearchBundle\Annotation as ES;
use ONGR\ElasticsearchBundle\Document\DocumentInterface;
use ONGR\ElasticsearchBundle\Document\DocumentTrait;
/**
* @ES\Document
*/
INFO: Pausing Coyote HTTP/1.1 on http-8080
Aug 05, 2014 5:23:22 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Aug 05, 2014 5:23:24 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/jenkins] created a ThreadLocal with key of type [com.sun.jna.Native$3] (value [com.sun.jna.Native$3@71dd3ae]) and a value of type [java.lang.Integer] (value [2]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Aug 05, 2014 5:23:24 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/jenkins] created a ThreadLocal with key of type [com.google.inject.internal.InjectorImpl$1] (value [com.google.inject.internal.InjectorImpl$1@37344828]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@496d5668]) but failed to remove it when the web application was s
topped. This is very likely to create a memory leak.
Aug 05, 2014 5:
<?php
$rootNode
->children()
->scalarNode('path')
->defaultValue('%kernel.cache_dir%/gitprojects')
->validate()->ifTrue(function($value){
return !file_exists($value);
})->thenInvalid('Path must exist')
->end()
@bestform
bestform / gist:10243160
Last active August 29, 2015 13:58
login feature
Given I am on "/"
And I fill in "slogin" with "foo"
And I fill in "password" with "bar"
And I press "loginbutton"
@bestform
bestform / gist:9760737
Created March 25, 2014 12:18
And in javascript
a = 4.89;
// 4.89
b = a * 100;
// 488.99999999999994