This file contains 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
#!/usr/bin/python3 | |
import string | |
import codecs | |
import random | |
s = """Ornhgvshy vf orggre guna htyl. | |
Rkcyvpvg vf orggre guna vzcyvpvg. | |
Fvzcyr vf orggre guna pbzcyrk. | |
Pbzcyrk vf orggre guna pbzcyvpngrq. |
This file contains 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
#!/bin/bash | |
# die () { | |
# echo >&2 "$@" | |
# exit 1 | |
# } | |
# v=4.2.24 | |
# [ "$v" = "4.2.24" ] || | |
# die "Patch solo puede aplicarse a create-elm-app@4.2.24, se encontro $v" | |
# usage: curl 'https://gist.githubusercontent.com/korutx/27f9b7d8fd2f141002c6922456d73ab9/raw/a1c05d17069acb64893066c725202c79e9c6a4db/patch-configure-devserver.sh' | bash /dev/stdin ~/.nvm/versions/node/v13.9.0/lib/node_modules | |
nmpath="$1" |
This file contains 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
/** | |
* Hight-Order Funcion | |
* Returns a single item by iterating through the list, successively calling the iterator function and passing it an accumulator value and | |
* the current value from the array, and then passing the result to the next call. | |
* @param {Array} list Array of element | |
* @param {Function} fn Functor. The iterator function. Receives two values, the accumulator and the current element from the array. | |
* @param {*} acc The accumulator value. | |
* @return {*} The final, accumulated value. | |
*/ | |
const reduce = (list, fn, acc) => { |
This file contains 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
#!/bin/sh | |
# @Author: @korutx | |
# @Date: 2018-05-31 12:18:34 | |
# @Last Modified time: 2018-05-31 12:18:34 | |
# | |
# Using: Add the following lines to .bashrc | |
# | |
# if [ -f ~/bin/my_prompt.sh ]; then | |
# . ~/bin/my_prompt.sh | |
# fi |
This file contains 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 mail = actions.create('mail'); | |
mail.parameters.from = "alfresco@mail.com"; | |
mail.parameters.to = 'somemail@mail.com'; | |
mail.parameters.template = root.childByNamePath("Company Home/Data Dictionary/Email Templates/notify_user_email.ftl"); | |
mail.parameters.text = "some text, in case template is not found"; | |
mail.execute(companyhome); |
This file contains 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
# add this prop to alfresco-global-properties | |
dev.email.not.sent=true |
This file contains 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
delete from alf_node_properties where node_id='178588'; | |
delete from alf_node_aspects where id='178588'; | |
delete from alf_child_assoc where child_node_id='178588'; | |
delete from alf_node where id='178588'; |
This file contains 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
<?xml version='1.0' encoding='UTF-8'?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:hz="http://www.hazelcast.com/schema/config" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd | |
http://www.hazelcast.com/schema/config | |
http://www.hazelcast.com/schema/config/hazelcast-spring.xsd"> | |
<bean id="mycustom.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent"> |
This file contains 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 client = mqtt.connect('ws://host:port', { | |
username: 'username', | |
clientId: 'client-id', | |
password: 'password' | |
}); | |
client.subscribe('endpoint'); | |
client.on('message', function (topic, payload) { | |
var evt = topic.toString(), args = payload.toString(); |
This file contains 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 node = search.findNode('<nodeRef>'); | |
var assocname = '<thumbnailname>'; | |
var nodeThumbnail = node.childAssocs['rn:rendition'].filter(function(assoc){ | |
return assoc.name == assocname; | |
})[0]; | |
if(nodeThumbnail){ | |
logger.log(nodeThumbnail.nodeRef); | |
} |
NewerOlder