Skip to content

Instantly share code, notes, and snippets.

View apinela's full-sized avatar

André Pinela apinela

  • Lisbon, Portugal
View GitHub Profile
@apinela
apinela / GetPostgresVersion.java
Created January 12, 2021 22:56
Java Method to get postgresql server version by using an hibernate session.
private static boolean validatePostresqlServerVersionGreaterOrEqualTo(short major, short minor) {
short actualMajor = 0;
short actualMinor = 0;
try {
Session session = HibernateUtil.getSession();
session.beginTransaction();
SQLQuery query = session.createSQLQuery("SELECT VERSION()");
query.setReadOnly(true);
@apinela
apinela / api.json
Last active October 11, 2016 13:43
{
"device": "bacon",
"display": "bacon-userdebug 6.0.1 M4B30X 20161010 test-keys",
"description": "This release stabalizes the camera and bluetooth.\nNew line in this description.",
"url": "http://get.cm/get/jenkins/182829/cm-13.0-20161010-NIGHTLY-bacon.zip",
"md5": "845dd21fd4ef107c58f84a676f8e9fe7220c09f9",
"date": "2016-10-10T00:23:35Z"
}
#!/bin/bash
# Run it like:
# bash <(curl -sk <THIS_FILE>)
tasks=0
i=0
(dd if=/dev/urandom of=testfile count=20 bs=1024 2>&1) > /dev/null
init_time=$(($(date +%s%N)/1000000))
function execProc {
import java.util.Random;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
(function(jQuery) {
/*! jQuery UI - v1.8.24 - 2012-09-28
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.core.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a, b) {
function c(b, c) {
var e = b.nodeName.toLowerCase();
if ("area" === e) {
var f = b.parentNode,
@apinela
apinela / build.sh
Last active November 26, 2015 14:47
#!/bin/bash
export CCACHE_DIR=.ccache/
export USE_CCACHE=1
. build/envsetup.sh
lunch $LUNCH
make clobber
make clean
time make -j$JOBS bacon
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="custom"
fetch="http://github.com" revision="cm-12.1" />
<remote name="blobs"
fetch="http://github.com" revision="cm-12.1" />
<project name="TheMuppets/proprietary_vendor_asus" path="vendor/asus"
remote="blobs" />