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/env bash | |
#Actualiza el servidor de produccion con el merge realizado | |
#en la rama release | |
#La informacion se sincroniza con rsync para no tener un repositorio | |
#en el servidor. NO. Se necesita hacer una copia local. no tiene sentido | |
#Hacer un puente con ssh y luego ejecutar git pull en el servidor |
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
Push notification from repository | |
To minimize the delay between a push and a build, it is recommended to set up the post-receive hook in the repository to poke Jenkins when a new push occurs. To do this, add the following line in your hooks/post-receive file, where <URL of the Git repository> is the fully qualified URL you use when cloning this repository. | |
curl http://yourserver/git/notifyCommit?url=<URL of the Git repository>[&branches=branch1[,branch2]*][&sha1=<commit ID>] |
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
% Copyright (c) 2010-2011, Lars Buitinck | |
% May be used, redistributed and modified under the terms of the | |
% GNU Lesser General Public License (LGPL), version 2.1 or later | |
% Heaps/priority queues in Erlang | |
% Heaps are data structures that return the entries inserted into them in | |
% sorted order. This makes them the data structure of choice for implementing | |
% priority queues, a central element of algorithms such as best-first/A* | |
% search and Kruskal's minimum-spanning-tree algorithm. |
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
private AtomicReferenceArray<Thread> consumerWorker; | |
@Override | |
public void block() throws InterruptedException { | |
boolean parked=false; | |
for(int index=0;index<consumer;index++) | |
{ | |
if(consumerWorker.get(index)==null && consumerWorker.compareAndSet(index, null, Thread.currentThread())) |
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
-module(dtls_client). | |
-export([connect/1]). | |
psk_verify(Username, UserState) -> | |
io:format("Server Hint: ~p~n", [Username]), | |
{ok, UserState}. | |
connect(Port) -> | |
[application:start(X) || X <- [crypto, asn1, public_key, ssl]], |
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
find src/main/java/com/a/p2/c -name *.java -exec grep -H package {} \; -exec sed -i '' 's/package com.a.p1.c/package com.a.p2.c/‘ {} \; -exec grep -H package {} \; | |
First move *.java files to new directory. Then use above to change from old package name (e.g., com.a.p1.c) to new package name (e.g., com.a.p2.c). |
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
Inspired by VividDreams' topic: "Mythical Creatures A-Z" | |
source: http://www.animationsource.org/board/japanese-mythical-creatures-t14593.html | |
A | |
* Abumi-guchi - a furry creature formed from the stirrup of a mounted military commander | |
* Abura-akago - an infant ghost who licks the oil out of andon lamps | |
* Abura-bō - a spook fire from Shiga Prefecture, in which the shape of a monk can often be seen | |
* Abura-sumashi - a spirit who lives on a mountain pass in Kumamoto Prefecture | |
* Akabeko - a red cow involved in the construction of Enzō-ji in Yanaizu, Fukushima |
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
Sample project for the "Getting started with JavaFX in Clojure" ( https://coderwall.com/p/4yjy1a ) ProTip. |
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
// Call this, or put in a method and call, where exception is being thrown | |
URL[] urls = ((URLClassLoader) (Thread.currentThread().getContextClassLoader())).getURLs(); | |
StringBuilder sz = new StringBuilder("Classpath jars ["); | |
sz.append(Integer.toString(urls.length)); | |
sz.append("]...\n"); | |
String searchFor = "jms/Session"; | |
Map<File, String> matches = new HashMap<>(); | |
for (URL url : urls) { | |
File file = new File(url.getFile()); | |
sz.append(" ").append(file.getAbsolutePath()); |
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
@doc """ | |
Inserts a link to the show path of a resource item. The | |
item must implement .id. | |
##Example | |
<%= read_more_link @conn, @post %> | |
""" | |
def read_more_link(conn, item) do |