Skip to content

Instantly share code, notes, and snippets.

View queirozfcom's full-sized avatar
💪
Nobody cares, work harder

Felipe Almeida (queirozfcom) queirozfcom

💪
Nobody cares, work harder
View GitHub Profile
@queirozfcom
queirozfcom / gist:42877fdb2ec6dc2573df
Last active August 29, 2015 14:02
Simple Vagrantfile that can be used to set up a simple Ubuntu 12.04 LTS box with XFCE GUI.
# Simplest possible Ubuntu 12.04 box with a GUI
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise32"
config.vm.provider "virtualbox" do |vb|
# Don't boot with headless mode
vb.gui = true
# Set a name that you can remember
@queirozfcom
queirozfcom / gist:19beb0ee49c469cd8837
Created July 8, 2014 02:31
Take an already instantiated obj and make it a null_object for the duration of a single test
describe '#put_resource!' do
before(:each) do
@c = Converter.new name: 'c'
@edge_in = double(from: double(), to: @c)
@edge_out = double(from: @c, to: double())
@c.attach_edge!(@edge_out).attach_edge!(@edge_in)
end
it 'does not ping incoming edges' do
before(:each) do
# doesn't work for what I need.
# allow_any_instance_of(Edge).to receive(:freeze).and_return(nil)
@c = Converter.new name: 'c'
@edge_in = instance_double(Edge, from: double(), to: @c, freeze: nil)
@edge_out = instance_double(Edge, from: @c, to: double(), freeze: nil)
@c.attach_edge!(@edge_in).attach_edge!(@edge_out)
end
{
"query": {
"multi_match": {
"query": "foo",
"fields": [
"title",
"document"
],
"fuzziness": "AUTO"
},
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
java.lang.NullPointerException
at java.util.regex.Pattern.<init>(Pattern.java:1350)
at java.util.regex.Pattern.compile(Pattern.java:1028)
at scala.util.matching.Regex.<init>(Regex.scala:191)
at scala.collection.immutable.StringLike$class.r(StringLike.scala:255)
at scala.collection.immutable.StringOps.r(StringOps.scala:29)
at scala.collection.immutable.StringLike$class.r(StringLike.scala:244)
at scala.collection.immutable.StringOps.r(StringOps.scala:29)
at ReadSOStanfordTokenize$$anonfun$2.apply(ReadSOStanfordTokenize.scala:102)
at ReadSOStanfordTokenize$$anonfun$2.apply(ReadSOStanfordTokenize.scala:72)
version: 0.2
phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- $(aws ecr get-login --region $AWS_DEFAULT_REGION)
build:
commands:
- echo Build started on `date`