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
{ | |
const FEATURE_VIDEOPLAYER_WEBCOMPONENT = true | |
if (!FEATURE_VIDEOPLAYER_WEBCOMPONENT) { | |
loadWebPackPlayer() | |
} else { | |
loadCalicoPlayer() | |
} | |
} | |
function loadWebPackPlayer() { |
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
{ | |
"advertising": { | |
"admessage": "Videon kommer att spelas om xx sekunder", | |
"adscheduleid": "RBpAHqAL", | |
"autoplayadsmuted": true, | |
"bids": { | |
"bidders": [ | |
{ | |
"id": "3508774", | |
"name": "PubMatic", |
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
test: | |
image: ubuntu:precise | |
command: /bin/sh |
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 | |
COMMAND="DEBIAN_FRONTEND=noninteractive apt-get install -qy $@" | |
eval $COMMAND || (apt-get update && eval $COMMAND) |
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
from timeit import timeit | |
def timeit_and_print(stmt, setup='pass', number=100000): | |
t = timeit(stmt, setup=setup) | |
print 'Executed "%s" %d times in %.4f seconds, %.4f ms per call (%d calls per second)' % ( | |
stmt, number, t, 1000 * t / number, int(number / t)) |
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
[user] | |
name = Emil Stenqvist | |
email = [email protected] | |
[branch] | |
autosetuprebase = always | |
[color] | |
diff = auto | |
status = auto |
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
/* | |
* $ gcc -std=c99 -o segfault segfault.c -lpthread | |
* segfault.c: In function ‘thread_fn’: | |
* segfault.c:7:5: warning: implicit declaration of function ‘strdup’ [-Wimplicit-function-declaration] | |
* segfault.c:7:17: warning: initialization makes pointer from integer without a cast [enabled by default] | |
* $ ./segfault | |
* Segmentation fault | |
*/ | |
#include <stdio.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
/* | |
* | |
* Simple benchmark of `pipe` (https://github.com/wowus/pipe) library | |
* | |
* $ gcc -O3 -pthread -o test pipe.c test.c | |
* $ ./test | |
* Consuming 2000000 items from the queue... | |
* Received 2000000 items in 0.52 seconds, average throughput of 3878081 items/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
#!/bin/bash | |
root_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
ssl_dir=$root_dir/ssl | |
mkdir -p $root_dir/ssl | |
echo ">> Generating SSL key and certificate..." | |
rm -rf $ssl_dir/* |
NewerOlder