I hereby claim:
- I am phuesler on github.
- I am phuesler (https://keybase.io/phuesler) on keybase.
- I have a public key whose fingerprint is 4C36 0148 3980 766F 7D18 509D AD99 FD67 2E21 510A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'benchmark' | |
require 'timeout' | |
N = 10_000 | |
def just_loop | |
N.times do |i| | |
i + 1 | |
end | |
end |
#!/bin/bash | |
# Simple tcp server using netcat | |
# - depending on the netcat version either use nc -l 5555 or nc -l -p 5555 | |
# - verify with `telnet locahhost 5555` | |
# - quit the telnet with `ctrl-]` and then type quit | |
# - the while loop is there so reopen the port after a client has disconnected | |
# - supports only one client at a time | |
PORT=5555; | |
while :; do nc -l -p $PORT | tee output.log; sleep 1; done |
#!/usr/bin/env node | |
// Start with nohup node log_server.js > output.log & | |
// Load the TCP Library | |
net = require('net'); | |
// Keep track of the clients | |
var clients = []; | |
// Start a TCP Server | |
net.createServer(function (socket) { |
#!/bin/bash | |
# save the project root. it seems that the | |
# python webserver needs absolute paths | |
PROJECT_ROOT=`pwd` | |
# We will Log the webserver's output to a log file | |
# Make sure the directory is there and we have a file | |
# to append to | |
mkdir -p log | |
touch log/webserver.log |
diff --git a/Makefile b/Makefile | |
index d8009c7..a74a6ee 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -3,7 +3,7 @@ | |
CC=g++ | |
DEFINES = -DUNITY_MASTERSERVER | |
-CFLAGS=-Wall -lpthread $(DEFINES) | |
+CFLAGS=-Wall -pthread $(DEFINES) |
#!/usr/bin/env bash | |
# Hackisch temporary solution to poll git and compile the code | |
# The server will reload automatically | |
while : | |
do | |
git remote update > /dev/null && git status -uno | grep -q "Your branch is behind" && git pull && ./rebar compile; | |
sleep 5; | |
done |
handle_info(tick, State) -> | |
Now = now(), | |
Waiting = lists:map(fun ({GameId, WantedPlayers, Players}) -> | |
{GameId, WantedPlayers, | |
lists:filter(fun ({_, _, _, Start, _}) -> | |
timer:now_diff(Now, Start) > 60000 | |
end, Players)} | |
end, State#state.waiting), | |
NewWaiting = lists:filter(fun ({_, _, []}) -> false; | |
(_) -> true |
class MyClass | |
@@myvar = "My Var" | |
def self.myvar | |
@@myvar | |
end | |
def self.myvar=(new_value) | |
@@myvar = new_value | |
end |
/* | |
* Asynchronous loading of ads. | |
* Below is of the top of my head rewrite to load multiple ads at the same time | |
* in a asynchronous fashion. | |
* | |
* I gave it a quick test run and it seems to work as fare as I can see | |
* | |
* | |
* var EpomConfig = EpomConfig || {ads : []}; | |
* (function(){ |