Skip to content

Instantly share code, notes, and snippets.

View davidecavestro's full-sized avatar

Davide Cavestro davidecavestro

View GitHub Profile
@davidecavestro
davidecavestro / code_bar_build.gradle
Created April 1, 2014 10:39
Urlclassloader and proxied annotations in gradle
apply plugin: 'java'
dependencies {
compile project (':foo')
}
@davidecavestro
davidecavestro / TreeTableTestModel.groovy
Created December 19, 2012 15:47
Trying to set up a TreeTable with glazedlists on a griffon app, as discussed on http://griffon-user.3225736.n2.nabble.com/Problem-expanding-TreeTable-nodes-td7578033.html
import ca.odell.glazedlists.BasicEventList
import ca.odell.glazedlists.DisposableMap
import ca.odell.glazedlists.FunctionList
import ca.odell.glazedlists.GlazedLists
import ca.odell.glazedlists.SortedList
import ca.odell.glazedlists.TreeList
...
import java.io.File;
import java.io.IOException;
import java.util.InputMismatchException;
import java.util.Scanner;
import org.apache.commons.io.FileUtils;
import com.orientechnologies.orient.core.config.OGlobalConfiguration;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.intent.OIntentMassiveInsert;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringReader;
import java.sql.Array;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.ClientInfoStatus;
import java.sql.Clob;
import java.sql.Connection;
@davidecavestro
davidecavestro / gist:6624920
Created September 19, 2013 15:08
Stacktrace of POM validation failure during gradle upload process
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':MY_APP:uploadBatchConfig'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:72)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:49)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:34)
at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter$1.run(CacheLockHandlingTaskExecuter.java:34)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:179)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:232)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142)
at org.gradle.api.internal.changedetection.DefaultTas
class Foo extends AbstractMap<Object, Object>{
String bar
def map = [:]
String getBar () {bar}
//map impl
public Set entrySet() {map.entrySet()}
}
@davidecavestro
davidecavestro / openpgp.txt
Created October 1, 2017 05:23
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:2a593a990e0a21ae09bfabf4d8490b88844b4cca]
@davidecavestro
davidecavestro / openpgp.txt
Created October 1, 2017 05:23
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:2a593a990e0a21ae09bfabf4d8490b88844b4cca]
@davidecavestro
davidecavestro / openpgp.txt
Created October 1, 2017 05:23
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:2a593a990e0a21ae09bfabf4d8490b88844b4cca]
@davidecavestro
davidecavestro / vpn_credentials_check.groovy
Created April 5, 2018 13:10
Validate vpn user credentials using `openconnect` command from groovy
/*
* Uses `openconnect` to validate vpn user credentials
* (tested on Debian GNU/Linux 9, where openconnect must be called as root user)
*/
credentials = [ //TODO set credentials here
user1 : 'pass1',
user2 : 'pass2'
]