Skip to content

Instantly share code, notes, and snippets.

@bochsdbg
bochsdbg / Dockerfile
Last active March 27, 2018 18:59
Test dockerfile for aicup
FROM ubuntu:16.04
MAINTAINER Sergey Samokhvalov <onlyforthesky@gmail.com>
# environment variables to be changed
ENV SOLUTION_CODE_ENTRYPOINT=main.cpp
ENV COMPILED_FILE_PATH=/opt/client/a.out
ENV DEFAULT_COMPILATION_COMMAND="g++ -m64 -pipe -O2 -std=c++11 -w -o $COMPILED_FILE_PATH $SOLUTION_CODE_ENTRYPOINT"
ENV DEFAULT_RUN_COMMAND="/lib64/ld-linux-x86-64.so.2 $COMPILED_FILE_PATH"
ENV DEBIAN_FRONTEND=noninteractive
@bochsdbg
bochsdbg / i3.config
Created May 10, 2018 22:42
my i3 config files
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@bochsdbg
bochsdbg / Dockerfile
Created August 15, 2018 18:38
aicups
FROM ubuntu:16.04
MAINTAINER Sergey Samokhvalov <onlyforthesky@gmail.com>
ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV SOLUTION_CODE_ENTRYPOINT=solution.cs
ENV SOLUTION_CODE_PATH=/opt/client/solution/
@bochsdbg
bochsdbg / aicups
Last active August 15, 2018 22:55
aicups test Dockerfile
#!/bin/bash
ACTION=""
DOCKER_TAG="aicups-test"
DOCKER_FLAGS="-u9999 --cpuset-cpus=0 --network none --ulimit nproc=50"
TMPDIR="/tmp/aicups-test"
ZIPPED=""
ARGS=()
CONTAINER_ID=""
-module(test_method).
%-compile([export_all, nowarn_export_all]).
% standard callbacks
-export([init/2, allowed_methods/2, content_types_provided/2, content_types_accepted/2, resource_exists/2]).
% custom callbacks
-export([method_jsone/2]).
2846259680917054518906413212119868890148051401702799230794179994274411340003764443772990786757784775815884062142317528830042339940153518739052421161382716174819824199827592418289259787898124253120594659962598670656016157203603239792632873671705574197596209947972034615369811989709261127750048419884541047554464244213657330307670362882580354896746111709736957860367019107151273058728104115864056128116538532596842582599558468814643042558983664931705925171720427659740744613340005419405246230343686915405940406622782824837151203832217864462718382292389963899282722187970245938769380309462733229257055545969002787528224254434802112755901916942542902891690721909708369053987374745248337289952180236328274121704026808676921045155584056717255537201585213282903427998981844931361064038148930449962159999935967089298019033699848440466541923625842494716317896119204123310826865107135451684554093603300960721034694437798234943078062606942230268188522759205702923084312618849760656074258627944882715595683153344053442544664841689458042
@bochsdbg
bochsdbg / main.cpp
Last active September 4, 2018 15:57
0 900.0000000000000000 300.0000000000000000
1 900.0000000000000000 300.0000000000000000
2 900.0000000000000000 299.8208000000000197
3 900.0000000000000000 299.4628653689623548
4 900.0000000000000000 298.9266602673209832
5 900.0666191788642436 298.5463640783465848
6 900.1601326780249792 298.1316464994481521
7 900.2775211616437900 297.6863695951958562
8 900.4145424732954552 297.2125517013183185
9 900.4601937712625386 296.0391422709075187
@bochsdbg
bochsdbg / main.c
Last active December 23, 2018 16:37
small hdd benchmark
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
#include <sys/stat.h>
#include <memory.h>
@bochsdbg
bochsdbg / _proc_cpuinfo
Created December 26, 2018 08:32
hlcup sysinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel Core i7 9xx (Nehalem Class Core i7)
stepping : 3
microcode : 0x1
cpu MHz : 2400.084
cache size : 4096 KB
physical id : 0
FROM elixir:latest
# Set exposed ports
EXPOSE 80
ENV PORT=80
ENV MIX_ENV=prod
ADD app/ ./
ADD script.sh ./