This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ads { | |
val formatter = ISODateTimeFormat.dateTime() | |
var date:DateTime = new DateTime | |
lazy val mongoColl = MongoConnection()("abc")("ads") | |
def list = { | |
val q = MongoDBObject("published" -> MongoDBObject("$lt" -> date)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).keydown(function(e){ | |
return (e.which != 8 || e.target.nodeName =='TEXTAREA' || e.target.nodeName == 'INPUT' && e.target.attributes.type.value == 'text'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// après avoir surchargé l'API facebook comme ci-dessous | |
FB.XFBML._getDomElements = function (a, e, d) { | |
var c = e + '-' + d; | |
if(FB.UA.ie()) | |
return document.querySelectorAll('.'+c); | |
else | |
return a.getElementsByClassName(c); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var el = document.evaluate("//ul[1][@class='some_class_name']/li[2]/a",document, null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null) | |
el.snapshotItem() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ace.config.set("modePath", "/userContent"); | |
ace.config.set("themePath", "/userContent"); | |
var groovyCommand = document.getElementsByName("groovy.command")[0]; | |
groovyCommand.setStyle('position:absolute;top:-10000px;left;-10000px;'); | |
var editor = document.createElement('div'); | |
editor.setAttribute('id','editor'); | |
editor.setStyle('position:relative; width:100%; min-height:500px;'); | |
editor.textContent = groovyCommand.textContent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.jackrabbit.oak.spi.commit.CommitInfo | |
import org.apache.jackrabbit.oak.spi.commit.EmptyHook | |
import org.apache.jackrabbit.oak.spi.state.NodeState | |
import org.apache.jackrabbit.oak.spi.state.NodeBuilder | |
class LibsCleaner { | |
def session | |
def scanBundles(remove = false) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.jackrabbit.oak.spi.commit.CommitInfo | |
import org.apache.jackrabbit.oak.spi.commit.EmptyHook | |
def fixNodeType(session, nodeType) { | |
def rootB = session.store.root.builder() | |
def nodeTypeB = rootB.getChildNode("jcr:system").getChildNode("jcr:nodeTypes").getChildNode(nodeType) | |
def propertyDefinitionB = nodeTypeB.getChildNode("jcr:propertyDefinition") | |
def move = propertyDefinitionB.moveTo(nodeTypeB,"jcr:propertyDefinition[1]") | |
session.store.merge(rootB, EmptyHook.INSTANCE, CommitInfo.EMPTY) | |
println move ? "success" : "error" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.jackrabbit.oak.spi.state.NodeState | |
import org.apache.jackrabbit.oak.api.Type | |
class BlobSearch { | |
def session | |
def check(){ | |
checkChildren(session.store.root.builder().nodeState) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.jackrabbit.oak.spi.commit.CommitInfo | |
import org.apache.jackrabbit.oak.spi.commit.EmptyHook | |
def removeLucene(session, index) { | |
def rootB = session.store.root.builder() | |
def luceneIndex = rootB.getChildNode("oak:index").getChildNode(index) | |
println luceneIndex.remove() ? "success" : "error" | |
session.store.merge(rootB, EmptyHook.INSTANCE, CommitInfo.EMPTY) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "samlproxy", | |
"version": "1.0.0", | |
"description": "", | |
"main": "server.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "Ilyas Türkben", | |
"license": "ISC", |
OlderNewer