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
docker run -it \ | |
--name sapi \ | |
-p 3000:3000 \ | |
--security-opt seccomp:chrome.seccomp.json \ | |
-e DISPLAY=unix$DISPLAY \ | |
-v /home/boni/public_html/app/my-api/gems:/usr/local/bundle \ | |
-v /home/boni/public_html/app/my-api:/var/www/my-api \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix \ | |
-v $HOME/Downloads:/home/dev/Downloads \ | |
-v $HOME/.config/google-chrome/:/home/dev/data \ |
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 | |
set -e | |
case "$1" in | |
rails|rake|passenger) | |
# ensure the right database adapter is active in the Gemfile.lock | |
if [ -z "$NO_BUNDLE" ]; then | |
# bundle install --without development test | |
bundle install | |
chown dev:dev $GEM_HOME -R |
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 myapp-base | |
RUN mkdir -p /var/www/myapp-api && chown dev /var/www/myapp-api | |
WORKDIR /var/www/myapp-api | |
COPY docker-entrypoint.sh / | |
ENTRYPOINT ["/docker-entrypoint.sh"] | |
EXPOSE 3000 |
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
# original idea taken from | |
# https://github.com/docker-library/redmine/blob/d564a3b0d78016b2f24af2d74bcdace26a1ac0a3/3.1/Dockerfile | |
FROM ruby:2.3 | |
MAINTAINER Bonaventura Fleischmann <[email protected]> | |
# Add user whose name the app will be run within the container | |
# the user id should be the default first linux user id | |
RUN useradd -u 1000 dev |
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
# Redmine - project management software | |
# Copyright (C) 2006-2016 Jean-Philippe Lang | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
http://stackoverflow.com/questions/941594/understanding-the-rails-authenticity-token | |
https://www.owasp.org/index.php/HttpOnly#Who_developed_HttpOnly.3F_When.3F | |
http://blog.codinghorror.com/protecting-your-cookies-httponly/ | |
http://stackoverflow.com/questions/1177863/how-do-i-ignore-the-authenticity-token-for-specific-actions-in-rails |
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
#define ENGINE_LEFT OUT_A | |
#define ENGINE_RIGHT OUT_C | |
#define ENGINE_BOTH OUT_AC | |
#define SENS_TOUCH IN_2 | |
#define SENS_US_FRONT IN_3 | |
#define SENS_US_LEFT IN_1 | |
#define SENS_COLOR IN_4 | |
int us_left_was, us_left_new; |
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
#define ENGINE_LEFT OUT_A | |
#define ENGINE_RIGHT OUT_C | |
#define ENGINE_BOTH OUT_AC | |
#define SENS_TOUCH IN_1 | |
#define SENS_US IN_3 | |
#define SENS_COLOR IN_4 | |
bool button_pressed() { | |
int pressed1, pressed2; |
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
#define ENGINE_LEFT OUT_A | |
#define ENGINE_RIGHT OUT_C | |
#define ENGINE_BOTH OUT_AC | |
#define SENS_TOUCH IN_4 | |
#define SENS_US IN_2 | |
#define SENS_COLOR IN_1 | |
bool button_pressed() { | |
int pressed1, pressed2; |
NewerOlder