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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <unistd.h> | |
#include <stdbool.h> | |
#include <time.h> | |
#include <stdarg.h> | |
#include <string.h> | |
#include "future.h" |
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
sub remove_and_prepend_path { | |
my $arr = shift; | |
my $path = shift; | |
my @backup; | |
while (@{$arr}) { | |
my $p = shift @{$arr}; | |
unshift @backup, $p unless ($p eq $path); | |
} | |
unshift @{$arr}, shift @backup while (@backup); | |
unshift @{$arr}, $path; |
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 | |
### BEGIN INIT INFO | |
# Provides: mojo_cdn | |
# Required-Start: $remote_fs $local_fs $network $syslog $time | |
# Required-Stop: $remote_fs $local_fs $network $syslog $time | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Description: starts mojo_cdn application | |
### END INIT INFO |