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 greymd/ojichat | |
| RUN apk update && \ | |
| apk --no-cache add openssh \ | |
| shadow && \ | |
| ssh-keygen -q -N "" -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key && \ | |
| adduser -D -H foo && \ | |
| usermod -p -U foo && \ | |
| echo 'foo:password' | chpasswd && \ | |
| echo "HostKey /etc/ssh/ssh_host_rsa_key" >> /etc/ssh/sshd_config && \ | |
| echo "PermitRootLogin no" >> /etc/ssh/sshd_config && \ | 
  
    
      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 ubuntu:focal AS builder | |
| RUN apt-get update && \ | |
| apt-get install --no-install-recommends -y gcc \ | |
| make \ | |
| libssh-dev \ | |
| ca-certificates \ | |
| libmysqlclient-dev \ | |
| git && \ | |
| apt-get clean && \ | 
  
    
      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 ( | |
| "encoding/json" | |
| "flag" | |
| "fmt" | |
| "github.com/gocolly/colly" | |
| "github.com/influxdata/influxdb-client-go/v2" | |
| "io" | |
| "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
    
  
  
    
  | find ./ -type f -printf "%f\n" | awk -F'[.]' '{print $1}' | xargs -I{} mkdir {} && find ./ -type f -printf "%f\n" | awk -F'[.]' '{print $1}' | xargs -I{} unzip {}.zip -d {} | 
  
    
      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 <errno.h> | |
| #include <sys/stat.h> | |
| #include <unistd.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <fcntl.h> | |
| #include <string.h> | |
| typedef struct machine_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
    
  
  
    
  | virsh list | grep running | awk '{print $2}' |\ | |
| xargs -I{} sh -c 'virsh vcpuinfo {} | tail -6 |\ | |
| head -1' | awk '{print $2}' | xargs -I{} expr {} + 1 |\ | |
| awk '{sum+=$1}END{print sum}' | 
  
    
      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 <sys/epoll.h> | |
| #include <sys/mman.h> | |
| #include <sys/socket.h> | |
| #include <sys/un.h> | |
| #include <unistd.h> | |
| #include <array> | |
| #include <cctype> | |
| #include <condition_variable> | |
| #include <cstring> | 
  
    
      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 <alloca.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| static void make_shift(unsigned long *shift, const char *ptrn, unsigned long ptrn_len) | |
| { | |
| unsigned long *border_position = alloca((ptrn_len + 1) * sizeof(unsigned long)); | |
| unsigned long i = ptrn_len; | |
| unsigned long j = i + 1; | |
| border_position[i] = j; |