Skip to content

Instantly share code, notes, and snippets.

View rubensayshi's full-sized avatar

Ruben de Vries rubensayshi

  • Amsterdam, Netherlands
View GitHub Profile
@rubensayshi
rubensayshi / JoomlaSessionStorage.php
Created June 24, 2011 21:18 — forked from naderman/JoomlaSessionStorage.php
Joomla! Symfony Integration Proof of Concept
<?php
namespace phpBB\JoomlaIntegration;
use Symfony\Component\HttpFoundation\SessionStorage\SessionStorageInterface;
class JoomlaSessionStorage implements SessionStorageInterface
{
protected $jSession;
@rubensayshi
rubensayshi / AmountModel.php
Created July 21, 2011 13:37 — forked from winzou/AmountModel.php
Subform Validation
<?php
namespace Asso\BookBundle\Form;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\ExecutionContext;
/**
* @Annotation
*/
@rubensayshi
rubensayshi / gist:1205807
Created September 9, 2011 09:06
Symfony2 BaseController with some helpers
<?php
namespace Hop\GeneralBundle\Controller;
use Symfony\Component\Security\Acl\Exception\InvalidDomainObjectException;
use Symfony\Component\Security\Acl\Model\DomainObjectInterface;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
@rubensayshi
rubensayshi / SequenceFileKeyInputFormat.java
Created April 19, 2012 15:48 — forked from dilip/SequenceFileKeyInputFormat.java
SequenceFileInputFormat and SequenceFileKeyRecordReader for enabling Hive to access data stored in a sequence file's key
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@rubensayshi
rubensayshi / hive_debug_output
Created April 24, 2012 15:48
Hive debug output - trying to get MAPJOIN to work
12/04/24 17:31:55 WARN conf.HiveConf: DEPRECATED: Ignoring hive-default.xml found on the CLASSPATH at /usr/local/hive-conf/hive-default.xml
12/04/24 17:31:55 WARN conf.HiveConf: hive-site.xml not found on CLASSPATH
12/04/24 17:31:55 DEBUG conf.HiveConf: Overriding Hadoop conf property fs.har.impl='org.apache.hadoop.fs.HarFileSystem' with Hive default value 'org.apache.hadoop.hive.shims.HiveHarFileSystem'
12/04/24 17:31:55 DEBUG conf.HiveConf: Overriding Hadoop conf property mapred.min.split.size='0' with Hive default value '1'
12/04/24 17:31:55 DEBUG conf.HiveConf: Overriding Hadoop conf property mapred.reduce.tasks='1' with Hive default value '-1'
12/04/24 17:31:55 DEBUG conf.HiveConf: Overriding Hadoop conf property mapred.reduce.tasks.speculative.execution='true' with Hive default value 'true'
Logging initialized using configuration in file:/usr/local/hive-conf/hive-log4j.properties
12/04/24 17:31:56 INFO SessionState: Logging initialized using configuration in file:/usr/local/hive-conf/hive-log4j.properti
@rubensayshi
rubensayshi / crashing_query.sql
Created April 25, 2012 07:13
error when doing lateral view + join in subquery
-- this is the query that causes the crash
SELECT
date_int,
gender,
SUM( `generic`['count'] ) AS count
FROM (
SELECT
memberId,
date_int,
members_map.gender AS gender,
@rubensayshi
rubensayshi / hive.log
Created April 26, 2012 13:09
Hive MAPJOIN + LATERAL VIEW
Logging initialized using configuration in jar:file:/opt/hive-0.8.1-bin/lib/hive-common-0.8.1.jar!/hive-log4j.properties
12/07/04 10:09:16 INFO SessionState: Logging initialized using configuration in jar:file:/opt/hive-0.8.1-bin/lib/hive-common-0.8.1.jar!/hive-log4j.properties
Hive history file=/tmp/hdfs/hive_job_log_hdfs_201207041009_796357994.txt
12/07/04 10:09:16 INFO exec.HiveHistory: Hive history file=/tmp/hdfs/hive_job_log_hdfs_201207041009_796357994.txt
ADD JAR /usr/local/hyves/bin/logging/hadoop/goldmine.jar
12/07/04 10:09:16 INFO SessionState: Added /usr/local/hyves/bin/logging/hadoop/goldmine.jar to class path
12/07/04 10:09:16 INFO SessionState: Added resource: /usr/local/hyves/bin/logging/hadoop/goldmine.jar
ADD JAR /usr/local/hyves/bin/logging/hadoop/json-serde-1.1-jar-with-dependencies.jar
12/07/04 10:09:16 INFO SessionState: Added /usr/local/hyves/bin/logging/hadoop/json-serde-1.1-jar-with-dependencies.jar to class path
12/07/04 10:09:16 INFO SessionState: Added resource: /usr/local/hyves/bin/
@rubensayshi
rubensayshi / plan.xml
Created April 26, 2012 13:36
Hive MAPJOIN + LATERAL VIEW
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_26" class="java.beans.XMLDecoder">
<object class="org.apache.hadoop.hive.ql.plan.MapredLocalWork">
<void property="aliasToFetchWork">
<object class="java.util.LinkedHashMap">
<void method="put">
<string>visit_stats:members_map</string>
<object class="org.apache.hadoop.hive.ql.plan.FetchWork">
<void property="limit">
<int>-1</int>
@rubensayshi
rubensayshi / gist:2654110
Created May 10, 2012 16:01
FusionCharts Y_Y
<script type='text/javascript' src='/statics/Charts/v3/FusionCharts.js'></script>
<div id="chart"></div>
<script type='text/javascript'>
window.addEvent('load', function() {
categoryJSON = '{"category":[{"label":"19-09-2011"},{"label":"20-09-2011"}]}';
dataJSON = '{"seriesname":"visitors total","renderas":"line","color":"8e8c6d","data":[{"value":0,"total":0,"date":"19-09-2011","toolText":"-"},{"value":0,"total":0,"date":"20-09-2011","toolText":"-"}],"parentYAxis":"S"}';
JSON = '{"chart":{"showLegend":"1","anchorRadius":"2","drawAnchors":"1","anchorAlpha":"100","canvasBorderThickness":"1","formatNumber":"1","formatNumberScale":"0","thousandSeparator":".","canvasBorderColor":"DADADA","showValues":"0","labelDisplay":"Rotate","slantLabels":"1","showBorder":"0","chartrightmargin":"5","bgColor":"FFFFFF","animation":"0","canvasPadding":"0","PYAxisName":"Main","SYAxisName":"AdHese","labelStep":7},';
@rubensayshi
rubensayshi / foo.js
Created June 7, 2012 15:56 — forked from jrunning/foo.js
Getting a class property from an instance of a Backbone.js model (without naming the class explicitly)
var C = Backbone.Model.extend({
foo : function() { return this.constructor.bar; }
}, {
bar : 123
});
var ci = new C;
ci.foo();
// -> 123