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 debian:wheezy | |
# Base system | |
RUN apt-get update && apt-get install git | |
RUN echo "deb http://deb.debian.org/debian jessie main" >> /etc/apt/sources.list | |
RUN apt-get update && apt-get install -y -t jessie gcc | |
WORKDIR /work | |
ENV PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabi/pkgconfig |
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
sudo python3.6 -m pip install decorator --upgrade |
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
firewall-cmd --zone=dmz --add-port=8080/tcp |
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
vconfig add eth0 5 | |
ifconfig eth0.5 | |
ifconfig eth0.5 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 up |
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
sudo yum reinstall selinux-policy-targeted | |
setsebool -P openvpn_enable_homedirs 1 | |
semanage fcontext -a -t home_cert_t .cert | |
restorecon -R -v .cert ->>> doit etre ".cert"!! |
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 www-data; | |
worker_processes 2; | |
error_log logs/error.log debug; | |
pid logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { |
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
class Article < ActiveRecord::Base | |
validates :title, presence: true, | |
length: { minimum: 5 } | |
end |
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
Turn Off the built in apache on OSx | |
Apr 1, 2013, 1 minute read, 191 words | |
Slack - a messaging app for teams, integrating with the tools you already use.ads via Carbon | |
There are a handful of reasons why you would want to turn off the built in apache on OSx, you might have installed your own version, maybe you don't use apache and it is interfering with something else, whatever the reason there is one command you need to run to turn it off. | |
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apa |
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://www.wvshare.com/product/3.2inch-RPi-LCD-B.htm | |
http://www.amazon.com/Waveshare-Raspberry-Resistive-Interface-Rapsberry-pi/dp/B00N0SNVQE | |
I have found that the initialization string is very close to fb_ili9340 driver, so after few days of testing I found this configuration is pretty stable | |
1) Use FBTFT drivers built into the kernel | |
sudo REPO_URI=https://github.com/notro/rpi-firmware BRANCH=builtin rpi-update | |
sudo reboot | |
2) After rebooting, check that SPI was created |
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
#include <iostream> | |
#include "server.h" | |
static void ev_handler(struct mg_connection *nc, int ev, void *ev_data) { | |
switch (ev) { | |
case MG_EV_RECV: | |
// do something | |
mg_printf(nc, "alsothis_1"); | |
break; | |
case MG_EV_HTTP_REQUEST: |
NewerOlder