Skip to content

Instantly share code, notes, and snippets.

View sirolf2009's full-sized avatar

Floris Thijssen sirolf2009

  • Rotterdam, Netherlands
View GitHub Profile
function map
set pars1 (expr $argv[1] - $argv[2])
set pars2 (expr $argv[5] - $argv[4])
set pars3 (expr $argv[3] - $argv[2])
expr (expr (expr $pars1 \* $pars2) / $pars3) + $argv[4]
end
def Link getChain(Single<?> single) {
try {
val source = single.getClass().getDeclaredField("source")
source.setAccessible(true)
val sourceInstance = source.get(single)
if(sourceInstance instanceof Single) {
return new Link(Optional.ofNullable(getChain(sourceInstance)), single.toString())
} else {
return new Link(Optional.empty(), single.toString())
}
@sirolf2009
sirolf2009 / JobManager.java
Last active November 8, 2018 13:14
muse scrapbook
/**
* DESIGN PATTERN
*/
public class JobManager {
final BlockingQueue<? extends JobExecution> persistLastRun = new LinkedBlockingQueue<>();
private JobManager() {
final Thread persistLastRunThread = new Thread(() -> {
while(true) {
[Unit]
Description = NAME
Wants=network.target
After=network.target
[Service]
ExecStart=BINARY
WorkingDirectory=/root
Restart=on-failure
https://www.quantconnect.com/processDataDownload/10136992-7bb5b7c6d565be667711a94cefce7929
https://www.quantconnect.com/processDataDownload/10136993-e666c662fdd5d0292d3d05b527771476
https://www.quantconnect.com/processDataDownload/10136994-9d7bdff40f2df49a3f89226267e1fbd3
https://www.quantconnect.com/processDataDownload/10136995-44d6598175980b16aaf5986d6243dad5
https://www.quantconnect.com/processDataDownload/10136996-319a8da4c9dc16d1b158a7a0d990a206
https://www.quantconnect.com/processDataDownload/10136997-37e0ca3b0941ffe69bc6c47ee802efcf
https://www.quantconnect.com/processDataDownload/10136998-249a3fc20c7fa5e1ab08055684049a49
https://www.quantconnect.com/processDataDownload/10136999-d9322dbd5190181c53b92a0e82d45513
https://www.quantconnect.com/processDataDownload/10137000-637b29fe317dede8b36e4574a58761cd
https://www.quantconnect.com/processDataDownload/10137001-abdff1f914d56dc823724497eb5b98ac
@sirolf2009
sirolf2009 / solarized_dark.xml
Created August 2, 2018 13:54
MuCommander solarized dark
<?xml version="1.0" encoding="UTF-8"?>
<theme>
<file_table>
<normal>
<background color="002b36"/>
<inactive_background color="002b36"/>
</normal>
<selected>
<background color="073642"/>
<inactive_background color="073642"/>
wget http://apache.hippo.nl/zookeeper/zookeeper-3.4.12/zookeeper-3.4.12.tar.gz
tar -xf zookeeper-3.4.12.tar.gz
cat > zookeeper-3.4.12/conf/zoo.cfg <<- EOM
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
function search-through-files
grep -rnw './' -e $argv
end
function tar-folder
tar -cvzf "$argv.tar" $argv
end
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<assembleDirectory>${project.build.directory}/${project.artifactId}</assembleDirectory>
<programs>
<program>
<mainClass>nl.northpool.eex.pusher.Pusher</mainClass>
<id>pusher</id>