Skip to content

Instantly share code, notes, and snippets.

View adambarreiro's full-sized avatar

Adam Barreiro adambarreiro

View GitHub Profile
@adambarreiro
adambarreiro / mixer
Last active August 29, 2015 14:14
A script for making your screen crazy
/**
* They see me rolling, they hatin'
*/
(function(target){
var time=1;
var all;
setInterval(function() {
time*=2;
all = document.getElementsByTagName(target);
for (var i=0, max=all.length; i < max; i++) {
@adambarreiro
adambarreiro / carltonBanks
Last active August 29, 2015 14:17
Clickable Carlton Banks injection
/**
* This is an extension of this Gist: https://gist.github.com/miquelcamps/5b7561f9c564e93b7eee
* The original function attached a Carlton Banks dancing to Tom Jones' It's Not Unusual
* to your current browser page.
* This function, besides that, allows to attach a click event with an ON/OFF behaviour.
* A click will fire this dancing Carlton and another click will remove it.
*
* "target" can be an identifier, a class or the name attribute of the element to click.
* Simply put this string instead of "YOUR_DIV_HERE".
*/
@adambarreiro
adambarreiro / keybase.md
Created July 30, 2017 21:37
keybase.md

Keybase proof

I hereby claim:

  • I am adambarreiro on github.
  • I am adambarreiro (https://keybase.io/adambarreiro) on keybase.
  • I have a public key ASCyBbJDxhjo9QrR6kJ8HUY0i2JErAY_jLACwo8GTW_6two

To claim this, I am signing this object:

@adambarreiro
adambarreiro / pom_property_retriever.groovy
Created April 26, 2018 16:08
How to obtain a POM property using a Jenkins pipeline
/**
* Obtains a specific property given as a maven-help plugin expression.
* For example 'project.artifactId'
*
* @param {String} args.mavenId - Maven installation ID
* @param {String} args.expression - Expression to obtain the property
* @return The POM property
*/
public String getPropertyFromPom(Map args) {
withMaven([maven: args.mavenId]) {
@adambarreiro
adambarreiro / TestJCE.java
Last active March 16, 2022 10:48
Tests whether JCE is installed or not
public class TestJCE {
public static void main(String[] args) {
try {
int maxKeyLen = javax.crypto.Cipher.getMaxAllowedKeyLength("AES");
System.out.println(maxKeyLen);
} catch (Exception e) {
e.printStackTrace();
}