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
config_version 1.2 | |
snapshot_root /mnt/rsnapshot/ | |
retain hourly 24 | |
retain daily 7 | |
retain weekly 4 | |
retain monthly 12 | |
retain yearly 10 | |
logfile /var/log/rsnapshot.log |
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
--- a/rsnapshot | |
+++ b/rsnapshot | |
@@ -3470,14 +3470,14 @@ sub rotate_lowest_snapshots { | |
if (-d "$config_vars{'snapshot_root'}/.sync") { | |
print_cmd( | |
- "mv", | |
+ "rsync -a --link-dest=../.sync/", | |
"$config_vars{'snapshot_root'}/.sync/", | |
"$config_vars{'snapshot_root'}/$interval.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
# Description: | |
# NicoLiveAlert | |
# https://github.com/fagai/nicolive-alert-slack | |
'use strict' | |
module.exports = (robot) -> | |
require('dotenv').config silent: true | |
room = 'news' |
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
diff --git a/Makefile b/Makefile | |
index 1c80c09..841eb2b 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -4,6 +4,7 @@ mandir = ${prefix}/share/man | |
CC = gcc | |
CFLAGS += -Wall -std=c99 -pedantic -O2 | |
+LIBS = -lssl -lcrypto | |
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 debian:stable-slim | |
ENV APP_DIR /app | |
WORKDIR $APP_DIR | |
RUN cp -p /usr/share/zoneinfo/Japan /etc/localtime | |
RUN apt-get update && apt-get install -y \ | |
build-essential libssl-dev libcurl4-openssl-dev libjansson-dev zlib1g-dev automake autotools-dev git |
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
# npm install lodash | |
# coffee -bc generate_password.coffee && node ./generate_password.js | |
`const _ = require('lodash')` | |
charList = "abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ123456789" # omit o,O,0 | |
symbolList = "._-=[]{}+#^!?" | |
symbolListEscaped = _.reduce symbolList.split(''), ((r, s) -> r += "\\#{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
package Plack::Middleware::Auth::Digest::Proxy; | |
use 5.008001; | |
use strict; | |
use warnings; | |
use parent qw/Plack::Middleware::Auth::Digest/; | |
use URI; | |
our $VERSION = '0.01'; | |
sub call { |
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
#!/bin/sh | |
# for CentOS7 | |
case $# in | |
1) | |
REMOTE_HOST=$1 | |
;; | |
*) | |
echo "usage: $0 <remote host>" | |
exit 1 |
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
#!/usr/bin/env ruby | |
class Main | |
require 'net/http' | |
require 'fileutils' | |
require 'thwait' | |
def initialize | |
@dir = './chunked_data' |
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
#!/usr/bin/env perl | |
# | |
# required: https://github.com/ssllabs/ssllabs-scan | |
use strict; | |
use warnings; | |
use lib "/usr/local/nagios/libexec"; | |
use vars qw($opt_H); | |
use Getopt::Long; |