Skip to content

Instantly share code, notes, and snippets.

Avatar

Hernan Liendo hernanliendo

  • Buenos Aires, Argentina
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am hernanliendo on github.
  • I am hernanliendo (https://keybase.io/hernanliendo) on keybase.
  • I have a public key whose fingerprint is 89EC F1D4 3528 F0A2 5DFC 74FB 8D59 21FE 74FF 082B

To claim this, I am signing this object:

@hernanliendo
hernanliendo / appengine-web.xml
Created Aug 26, 2014
Hackademy - appengine-web.xml
View appengine-web.xml
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>appname</application>
<version>41</version>
<module>default</module>
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/classes/logging.properties"/>
</system-properties>
@hernanliendo
hernanliendo / BigQueryClient.java
Created Aug 26, 2014
Hackademy - BigQueryClient
View BigQueryClient.java
package ar.com.zupcat.lib.bean.audit;
import ar.com.zupcat.lib.bean.IClosure;
import ar.com.zupcat.lib.bean.RetryingExecutor;
import ar.com.zupcat.lib.bean.enums.ErrorType;
import ar.com.zupcat.lib.exception.GAEException;
import ar.com.zupcat.lib.util.RandomUtils;
import com.google.api.client.util.Data;
import com.google.api.services.bigquery.Bigquery;
import com.google.api.services.bigquery.model.*;
@hernanliendo
hernanliendo / SendClientLogToBigQueryService.java
Created Aug 26, 2014
Hackademy - BigQuery client example
View SendClientLogToBigQueryService.java
final List<Map<String, Object>> rowValues = new ArrayList<>(logsSharedObject.getItems().size());
for (final ObjectVar itemOV : logsSharedObject.getItems()) {
final Map<String, Object> item = new HashMap<>();
rowValues.add(item);
item.put("User", clientUserId);
item.put("Timestamp", time);
item.put("Device", device);
item.put("Type", itemOV.getString("t"));
@hernanliendo
hernanliendo / BigQueryServerFactory.java
Created Aug 26, 2014
Hackademy - BigQueryServerFactory
View BigQueryServerFactory.java
package ar.com.zupcat.lib.bean.audit;
import com.google.api.client.extensions.appengine.http.UrlFetchTransport;
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
import com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential;
import com.google.api.client.http.HttpRequestInitializer;
import com.google.api.client.json.jackson.JacksonFactory;
import com.google.api.services.bigquery.Bigquery;
import com.google.api.services.bigquery.BigqueryScopes;
import com.google.appengine.api.appidentity.AppIdentityServiceFactory;
@hernanliendo
hernanliendo / BigQueryClientFactory.java
Created Aug 26, 2014
Hackademy - BigQueryClientFactory
View BigQueryClientFactory.java
package ar.com.zupcat.lib.bean.audit;
import ar.com.zupcat.lib.bean.enums.ErrorType;
import ar.com.zupcat.lib.exception.GAEException;
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.auth.oauth2.TokenResponse;
import com.google.api.client.googleapis.auth.oauth2.*;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.javanet.NetHttpTransport;
import com.google.api.client.json.JsonFactory;
@hernanliendo
hernanliendo / GCSBackupFileReader.java
Created Dec 28, 2013
GCS Backup File Reader Example
View GCSBackupFileReader.java
package com.zupcat.sca.initializer;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.EntityTranslator;
import com.google.appengine.api.files.*;
import com.google.appengine.tools.development.testing.LocalBlobstoreServiceTestConfig;
import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;
import com.google.appengine.tools.development.testing.LocalMemcacheServiceTestConfig;
import com.google.appengine.tools.development.testing.LocalServiceTestHelper;