Skip to content

Instantly share code, notes, and snippets.

View doevelopper's full-sized avatar

Adrien H doevelopper

  • Versailles
View GitHub Profile
@doevelopper
doevelopper / bazel-tips.md
Last active April 14, 2020 23:10
Tips running bazel
$> bazel query @bazel_tools//...
$> bazel query @bazel_tools//src/conditions:all
$> bazel query @bazel_tools//platforms:all
$> bazel query 'kind(cc_binary, //...)'
$> bazel run //:buildifier
$> buildables=$(bazel query \
    --keep_going \
    --noshow_progress \
 "kind(.*_binary, rdeps(//..., set(${files[*]})))")
Bazel
https://drake.mit.edu/bazel.html?highlight=gurobi
https://github.com/RobotLocomotion/drake
https://github.com/orieken/tdd_in_cpp_with_bazel/blob/master/tests/RetweetCollectionTest.cpp
https://github.com/qixiuai/pplx/blob/master/pplx/BUILD
https://github.com/thinlizzy/bazelexample/blob/master/example/BUILD
enum Level 
{
	EMERG  = 0, // Emergency     - A "panic" condition usually affecting multiple apps/servers/sites. At this level it would usually notify all tech staff on call.
	ALERT  = 1, // Alert         - Should be corrected immediately, therefore notify staff who can fix the problem. An example would be the loss of a primary ISP connection.
	CRIT   = 2, // Critical      - Should be corrected immediately, but indicates failure in a secondary system, an example is a loss of a backup ISP connection.
	ERROR  = 3, // Error         - Non-urgent failures, these should be relayed to developers or admins; each item must be resolved within a given time.
	WARN   = 4, // Warning       - Warning messages, not an error, but indication that an error will occur if action is not taken, e.g. file system 85% full - each item must be resolved within a given time.
	NOTICE = 5, // Notice        - Events that are unusual but not error conditions - might be summarized in an email to developers or admins to spot potential p
@doevelopper
doevelopper / BDD.md
Created February 14, 2020 14:01
Kill cucumber process an end of integration test
lsof -ti tcp:3902 | ([[ $? == 0 ]] && xargs kill -9 || echo "Not Cucumber s PID to kill found" )
[<img src="https://cloud.githubusercontent.com/assets/8225057/5990484/70413560-a9ab-11e4-8942-1a63607c0b00.png" align="right">](http://www.patreon.com/Adrien AH)
.PHONY: configure
configure: ## Generate Cmake Build configurations in ${BUILD_DIRECTORY}
     @cmake -E chdir ${BUILD_DIRECTORY} cmake -G "Unix Makefiles" \
        -DCMAKE_PREFIX_PATH=/opt/dds \
        -DCMAKE_INSTALL_PREFIX=$(basename $(pwd))-build/.local \
        "-DCMAKE_LINK_WHAT_YOU_USE=TRUE" \
        "-DCMAKE_CXX_CPPLINT=/usr/local/bin/cpplint;--linelength=120" \
        "-DCMAKE_CXX_CPPCHECK=/usr/local/bin/cppcheck;--std=c++1" \
 "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-3.9;-checks=*"\
@doevelopper
doevelopper / nginx-tuning.md
Created February 7, 2020 14:46 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf
FROM openjdk:8-jre-alpine
RUN apk add --update curl unzip
# Install the sonar client
#    https://binaries.sonarsource.com/CommercialDistribution/sonarqube-developer/sonarqube-developer-8.0.zip

RUN cd /tmp \
    && curl -L -O -k https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.2.0.1873-linux.zip \
    && gpg --batch --verify sonarqube.zip.asc sonar-scanner-cli-4.2.0.1873-linux.zip
    && mkdir /etc/sonar-scanner \