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
--- | |
- name: Download + compile recent versions of OpenSSL,OpenVPN and easyrsa3 from source | |
hosts: all | |
gather_facts: true | |
vars: | |
user_configuration: | |
servername: vpn.localhost.com | |
easyrsa_path: "/usr/local/easyrsa3" | |
openssl_version: "3.3.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
diff -upwbr quagga/bgpd/bgpd.c quagga-jk/bgpd/bgpd.c | |
--- quagga/bgpd/bgpd.c 2012-06-27 12:02:11.000000000 +0200 | |
+++ quagga-jk/bgpd/bgpd.c 2012-06-27 12:06:46.000000000 +0200 | |
@@ -4646,6 +4646,7 @@ peer_uptime (time_t uptime2, char *buf, | |
/* Making formatted timer strings. */ | |
#define ONE_DAY_SECOND 60*60*24 | |
#define ONE_WEEK_SECOND 60*60*24*7 | |
+#define ONE_YEAR_SECOND 60*60*24*7*52 | |
if (uptime1 < ONE_DAY_SECOND) |
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 -crB ipsec-tools-0.8-alpha20090422/src/racoon/isakmp_xauth.c joerg/ipsec-tools-0.8-alpha20090422/src/racoon/isakmp_xauth.c | |
*** ipsec-tools-0.8-alpha20090422/src/racoon/isakmp_xauth.c 2009-06-02 08:08:09.000000000 +0200 | |
--- joerg/ipsec-tools-0.8-alpha20090422/src/racoon/isakmp_xauth.c 2009-06-02 08:08:18.000000000 +0200 | |
*************** | |
*** 893,898 **** | |
--- 893,905 ---- | |
atlist[1] = NULL; | |
atlist[2] = NULL; | |
+ /* deny empty login */ |
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::net::UdpSocket; | |
use std::fs::File; | |
use std::io::prelude::*; | |
fn main() { | |
let host = "127.0.0.1"; | |
let port = "53"; | |
let x = File::open("/etc/passwd"); | |
let mut file = match x { |
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::net::TcpStream; | |
fn main() { | |
for port in 0 .. 30 { | |
if let Ok(_) = TcpStream::connect(format!("{}:{}", "anyhost", port)) { | |
println!("{} open", port); | |
} | |
} | |
} |
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/perl | |
foreach (split /[\r\n]+/, `supervisorctl status`) { | |
/([\w\-\d_]+)\s+([A-Z]+)\s+(.*)$/; | |
if($2 eq 'RUNNING') { print "0";} else { print "1";} | |
print " $1 - $3\n"; | |
} |
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 main | |
import ( | |
"fmt" | |
"syscall" | |
"unsafe" | |
) | |
const ( | |
SCHED_NORMAL = iota |
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/perl -w | |
use strict; | |
# Some vars.. | |
my @KPKGS; | |
my $myKernel = `uname -r`; | |
chomp $myKernel; | |
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
# Instructions for working with QEMU image come from | |
# https://www.kumari.net/index.php/system-adminstration/49-mounting-a-qemu-image | |
1. Download image http://cloud-images.ubuntu.com/ | |
2. Install qemu, nbd-client | |
3. Load the module | |
sudo modprobe nbd max_part=8 | |
4. Connect image | |
sudo qemu-nbd --connect=/dev/nbd0 Downloads/xenial-server-cloudimg-amd64-disk1.img | |
5. Mount image |
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/bash | |
mysql_containers=`docker ps -f ancestor=mysql:8.0 --format '{{.ID}}:{{.Names}}'` | |
for i in $(echo $mysql_containers) | |
do | |
echo $i | |
arr=($(echo $i | sed "s/:/ /g")) | |
if [ "${#arr[@]}" -eq "2" ]; then |
NewerOlder