Skip to content

Instantly share code, notes, and snippets.

View ghermeto's full-sized avatar

Guilherme Hermeto ghermeto

View GitHub Profile
@ghermeto
ghermeto / README.md
Created June 13, 2019 20:46
Optional chaining survey @ Netflix

Context

@ghermeto
ghermeto / Rakefile
Created September 1, 2011 23:20
Simple spec example
$: << File.expand_path(File.dirname(__FILE__) + "/lib")
require 'rake'
require 'rspec/core/rake_task'
desc "Run all the specs"
RSpec::Core::RakeTask.new do |t|
t.pattern = ENV['spec'] || 'spec/**/*_spec.rb'
t.rspec_opts = ["--color"]
end
@ghermeto
ghermeto / blitz_spec.js
Created August 22, 2011 13:39
jasmine-node simple sample
var Blitz = require('../lib/blitz.js');
describe("Blitz", function () {
it("should return a Rush Result object", function () {
var finished = false;
runs (function() {
Blitz('user', 'key', 'localhost', 9295)
.rush({
user: 'c123',
pattern: { intervals: []},
@ghermeto
ghermeto / status.xhtml
Created August 9, 2011 15:11
JSF 2 composite component will throw a IllegalArgumentException with Mojarra 2.0.3+ (http://java.net/jira/browse/JAVASERVERFACES-1849)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:composite="http://java.sun.com/jsf/composite">
<!-- INTERFACE -->
<composite:interface>
<composite:attribute name="for" required="true"/>
<composite:attribute name="rendered" default="true"/>
@ghermeto
ghermeto / blitz-app.py
Created August 4, 2011 18:22
Using blitz python api client
from blitz.sprint import Sprint
from blitz.rush import Rush
def callback():
print("SUCCESS")
def sprint():
options = {'url': "http://your.cool.app"}
s = Sprint('[email protected]', 'aqbcdge-sjfkgurti-sjdhgft-skdiues')
s.execute(options, callback)
@ghermeto
ghermeto / blitz-app.js
Created August 4, 2011 18:17
Using blitz node.js api client
var Blitz = require('blitz');
var email = "[email protected]",
apiKey = "aqbcdge-sjfkgurti-sjdhgft-skdiues",
myWebsite = "http://your.cool.app",
blitz= new Blitz(email, apiKey);
// Run a sprint
blitz.sprint({
steps: [{url: myWebsite}],
@ghermeto
ghermeto / pom.xml
Created August 4, 2011 16:40
Using blitz maven plugin
<project>
<groupId>com.example</groupId>
<artifactId>my-cool-app</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>My Cool App</name>
<url>http://your.cool.app</url>
<build>
@ghermeto
ghermeto / BlitzApp.java
Created August 4, 2011 14:46
Using blitz java api client
package com.example;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import io.blitz.curl.*;
import io.blitz.curl.config.*;
import io.blitz.curl.rush.*;
import io.blitz.curl.sprint.*;