This file contains hidden or 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
| /* curl_multi_test.c | |
| Clemens Gruber, 2013 | |
| <clemens.gruber@pqgruber.com> | |
| Code description: | |
| Requests 4 Web pages via the CURL multi interface | |
| and checks if the HTTP status code is 200. | |
| Update: Fixed! The check for !numfds was the problem. |
This file contains hidden or 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
| use std::{env,ffi,fs,io,path}; | |
| const DEFAULT_DEPTH: usize = 1024; | |
| fn main() -> io::Result<()> { | |
| let max_depth: usize = env::args() | |
| .nth(1) | |
| .and_then(|s| s.parse().ok()) | |
| .unwrap_or(DEFAULT_DEPTH); |
This file contains hidden or 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
| # /etc/sysctl.conf | |
| # Clemens Gruber, 2014 | |
| # | |
| # Uncomment this to prevent users from seeing information about processes that | |
| # are being run under another UID. | |
| security.bsd.see_other_uids=0 | |
| ## I/O |
This file contains hidden or 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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <uv.h> | |
| #include <curl/curl.h> | |
| uv_loop_t *loop; | |
| CURLM *curl_handle; | |
| uv_timer_t timeout; | |
| typedef struct curl_context_s { |
This file contains hidden or 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
| [Unit] | |
| Description=NGINX HTTP and reverse proxy server | |
| After=syslog.target network.target nss-lookup.target | |
| [Service] | |
| Type=forking | |
| PIDFile=/var/run/nginx.pid | |
| ExecStartPre=/usr/sbin/nginx -t | |
| ExecStart=/usr/sbin/nginx | |
| ExecReload=/usr/bin/kill -s HUP $MAINPID |
This file contains hidden or 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: Clemens Gruber <clemens.gruber@pqgruber.com> | |
| Date: Thu, 4 Aug 2016 14:51:44 +0200 | |
| Subject: [PATCH] stty: RS-485 support | |
| Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com> | |
| --- | |
| coreutils/stty.c | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++---- | |
| 1 file changed, 150 insertions(+), 9 deletions(-) | |
| diff --git a/coreutils/stty.c b/coreutils/stty.c |
This file contains hidden or 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
| # /etc/make.conf | |
| # Clemens Gruber, 2017 | |
| # | |
| # Nearby mirror | |
| #MASTER_SITE_OVERRIDE="ftp://ftp.at.freebsd.org/pub/FreeBSD/ports/distfiles/" | |
| #MASTER_SITE_OVERRIDE="ftp://ftp.de.freebsd.org/pub/FreeBSD/ports/distfiles/" | |
| # Build | |
| MAKE_JOBS_NUMBER?=8 |
This file contains hidden or 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
| unsigned int | |
| /* a = 1, */ /* Comment A */ | |
| b = 2, /* Comment B */ | |
| c = 3; /* Comment C */ | |
| int main(int argc, char *argv[]) | |
| { | |
| return 0; | |
| } |
This file contains hidden or 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
| void main(void) | |
| { | |
| int a = 1; | |
| /* FOO begins */ | |
| #ifndef FOO | |
| if (a) | |
| { | |
| return; | |
| } |
This file contains hidden or 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
| void main(void) | |
| { | |
| if (1) | |
| { | |
| /* Comment */ | |
| #ifdef FOO | |
| printf("bar"); | |
| #endif | |
| } | |
| } |
NewerOlder