Skip to content

Instantly share code, notes, and snippets.

View juanpicado's full-sized avatar
🌴
holidays

Juan Picado juanpicado

🌴
holidays
View GitHub Profile
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.2.0 -Dpackaging=jar -Dfile=/path/to/file
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
1) com.oracle:ojdbc6:jar:11.2.0.2.0
juan-picado:atlassian-jira-5.0-rc3-source juan$ ./build.sh
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Atlassian Embedded Crowd - API
[INFO] Atlassian IP
[INFO] Atlassian Crowd Integration API
[INFO] Atlassian Concurrency Utilities
[INFO] Atlassian Event
@juanpicado
juanpicado / async_function.js
Created September 23, 2016 18:16
async function example
const myPromise = (a) => {
return Promise.resolve(a);
}
async function foo() {
let d1 = await myPromise(1).then(console.log);
let d2 = await myPromise(2).then(console.log);;
}
function Foo(x, y) {
this.x = x;
this.y = y;
}
var A = new Foo(1,3);
var B = new Foo(2,4);
// we modify the object
B.z = 4;
@juanpicado
juanpicado / gist:6d7f18e2916a9e65259da9d35e39c8f0
Created September 3, 2016 19:58 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@juanpicado
juanpicado / idea.vmoptions
Created June 25, 2016 08:58 — forked from ilguzin/idea.vmoptions
High performance Mac OS X IntelliJ IDEA options: /Applications/IntelliJ IDEA 12 CE.app/bin/idea.vmoptions
-server
-Xms512m
-Xmx2048m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=256m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops
-XX:+UseConcMarkSweepGC
-XX:+AggressiveOpts
-XX:+CMSClassUnloadingEnabled
@juanpicado
juanpicado / ast-types.js
Created March 20, 2016 19:33
ast-types.js
var assert = require("assert");
var n = require("ast-types").namedTypes;
var b = require("ast-types").builders;
var fooId = b.identifier("foo");
var ifFoo = b.ifStatement(fooId, b.blockStatement([
b.expressionStatement(b.callExpression(fooId, []))
]));
assert.ok(n.IfStatement.check(ifFoo));
@juanpicado
juanpicado / esmangle
Last active March 20, 2016 18:56
esmangle example
var esprima = require('esprima');
var esmangle = require('esmangle');
var escodegen = require('escodegen');
var codeBase = require('./code');
var ast = esprima.parse(codeBase.wholeFile());
var result = esmangle.mangle(ast); // gets mangled result
console.log(escodegen.generate(result, {
format: {
renumber: true,
@juanpicado
juanpicado / esrefactor.js
Last active March 20, 2016 18:51
esrefactor example
var esrefactor = require('esrefactor');
var code = require('./ast');
// function bar(){ var a; console.log("foo", a);}
var ctx = new esrefactor.Context(code.codeVariable);
var id = ctx.identify(21);
console.log("id", id);
//id { identifier: { type: 'Identifier', name: 'a', range: [ 20, 21 ] },
// declaration: { type: 'Identifier', name: 'a', range: [ 20, 21 ] },