Skip to content

Instantly share code, notes, and snippets.

View kaworu's full-sized avatar

Alexandre Perrin kaworu

View GitHub Profile
#!/bin/sh
mkdir_options="-m 700"
mkdir $mkdir_options /tmp/foo
rmdir /tmp/foo
@kaworu
kaworu / t.sh
Created September 2, 2016 09:23
#!/bin/sh
argv_dump() {
while [ $# -ne 0 ]; do
echo -- $1
shift
done
}
main() {
# configuration file for newsyslog, see /etc/newsyslog.conf
#
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
/var/log/nsd.log nsd:nsd 644 4 100 * JC /var/run/nsd/nsd.pid
# configuration file for newsyslog, see /etc/newsyslog.conf
#
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
#/var/log/nginx-error.log 644 7 100 * J /var/run/nginx.pid 30
/var/log/nginx/aarongans.ch-access.log 644 10 100 * J /var/run/nginx.pid 30
/var/log/nginx/admin.sanchin-power.ch-access.log 644 10 100 * J /var/run/nginx.pid 30
/var/log/nginx/autoconfig.kaworu.ch-access.log 644 10 100 * J /var/run/nginx.pid 30
/var/log/nginx/kaworu.ch-access.log 644 10 100 * J /var/run/nginx.pid 30
/var/log/nginx/mirror.kaworu.ch-access.log 644 10 100 * J /var/run/nginx.pid 30
#include <string.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
size_t
nchars(const char *s)
{
size_t charlen, chars;
/*
* ntpd.c - main program for the fixed point NTP daemon
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "ntp_machine.h"
#include "ntpd.h"
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NELEM(x) (sizeof(x) / sizeof(*(x)))
// MUST be sorted
const char *haystack[] = {
"bar",
2016-05-23 21:42:45 #853(controller) <7e516b>; task; rspamd_sqlite3_run_prstmt: failed to execute query BEGIN IMMEDIATE TRANSACTION;: 8, attempt to write a readonly database
2016-05-23 21:42:45 #853(controller) <7e516b>; task; rspamd_sqlite3_run_prstmt: failed to execute query INSERT INTO learns(digest, flag) VALUES (?1, ?2);: 8, attempt to write a readonly database
2016-05-23 21:42:45 #853(controller) <7e516b>; task; rspamd_sqlite3_run_prstmt: failed to execute query COMMIT;: 1, cannot commit - no transaction is active
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <err.h>
// create array a of size n; fill with constant c
// write a to file in binary
// read back a from file
[...]
======
/etc/ssl/cert.pem diffs (-OLD +NEW)
======
--- /var/backups/etc_ssl_cert.pem.current Fri Jan 15 01:30:33 2016
+++ /etc/ssl/cert.pem Fri Apr 22 12:20:41 2016
@@ -1,1152 +1,1225 @@
+# $OpenBSD: cert.pem,v 1.11 2016/02/17 13:06:54 sthen Exp $
+
+### AddTrust AB