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
package main | |
import ( | |
"database/sql" | |
"encoding/json" | |
"errors" | |
"fmt" | |
"log" | |
"net/http" | |
"time" |
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 | |
if [ $# -eq 0 ] ; then | |
echo "Usage: repoName" | |
exit 1 | |
fi | |
# git base folder | |
gitFolder="/volume1/git/" |
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
/** | |
* To enable web services of Apache CXF | |
*/ | |
@Configuration | |
@ImportResource({"classpath:META-INF/cxf/cxf.xml"}) | |
protected static class CXFConfiguration { | |
@Autowired | |
private Bus cxfBus; | |
@Bean |
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
import std.stdio, std.concurrency; | |
import core.thread; | |
alias Thread.sleep sleep; | |
void ping() { | |
Tid pong; | |
try { | |
for(;;){ | |
receive( | |
(string s){ |
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
import std.stdio, std.concurrency; | |
void myActor() { | |
try { | |
for(;;){ | |
receive( | |
(int i){ writeln("Received integer: ",i); } | |
); | |
} | |
}catch(Exception e){ |
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 loc = window.location, new_uri; | |
if (loc.protocol === "https:") { | |
new_uri = "wss:"; | |
} else { | |
new_uri = "ws:"; | |
} | |
new_uri += "//" + loc.host; | |
var ws_location += loc.pathname + "/wsmessage"; | |
var client = ngstomp(ws_location, { |
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
package tk.aalkhodiry.concurrent.utils; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.scheduling.TaskScheduler; | |
import org.springframework.scheduling.Trigger; | |
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; | |
import javax.annotation.PostConstruct; | |
import java.util.Date; |
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
/* | |
* Register error provider that shows message on failed requests | |
* or redirects to login page on unauthenticated requests | |
*/ | |
$httpProvider.interceptors.push(function($q, $rootScope, $location, $log, alertsService) { | |
return { | |
'responseError' : function(rejection) { | |
if (!rejection.config.ignoreAuthModule) { | |
switch (rejection.status) { |
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 | |
set -e | |
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG | |
trap 'echo FAILED COMMAND: $previous_command' EXIT | |
#------------------------------------------------------------------------------------------- | |
# This script will download packages for, configure, build and install a GCC cross-compiler. | |
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running. | |
# If you get an error and need to resume the script from some point in the middle, | |
# just delete/comment the preceding lines before running it again. |
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
package tk.aalkhodiry.client.akka; | |
import org.springframework.context.ApplicationContext; | |
import akka.actor.Actor; | |
import akka.actor.IndirectActorProducer; | |
/** | |
* An actor producer that lets Spring create the Actor instances. | |
*/ |