This file contains 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 | |
apt update && apt install -y curl sudo && \ | |
adduser --gecos "" cloverstd && \ | |
usermod -aG sudo cloverstd && \ | |
echo "cloverstd ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/90-cloverstd && \ | |
runuser -u cloverstd -- bash -c "ssh-import-id-lp cloverstd && ssh-import-id-gh cloverstd" && \ | |
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config && \ | |
echo "PermitRootLogin no" >> /etc/ssh/sshd_config && \ | |
systemctl reload ssh && \ |
This file contains 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
<script> | |
/** | |
* [js-sha3]{@link https://github.com/emn178/js-sha3} | |
* | |
* @version 0.8.0 | |
* @author Chen, Yi-Cyuan [emn178@gmail.com] | |
* @copyright Chen, Yi-Cyuan 2015-2018 | |
* @license MIT | |
*/ |
This file contains 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
mixed-port: 17890 | |
redir-port: 17892 | |
allow-lan: true | |
mode: rule | |
log-level: info |
This file contains 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI+CFCrtFoUCO5StL3hFD5nyvPNutLmkazMEHC43nLQfj+ZtsOHJUyhj5TSsFHogoi3XdTi1MexFk5zPfwgRnXvWAYRlhqiG0fx7zKaqy/1RI2t/+JWcOGhEy91s2t8gHOj2Tub/vAzKWvgJRzhTjDlZ+LumkpuWL3tIHXcd9X2R16JQ92PpkTwgSefpcogOObiQbuYVTpjq9WCCjKktxR7G/BxfeoOjQbDjzhEkqI96Bsl73cMPn9VyLazZVXacLF0C7KZ19GWSER0+3d3KYOFSUdS22OfnirwVwaoFnDvCX7bBStzVdpT4q2M/6uSTRpp5JjL69hiXwFemjksWOT cloverstd@hui.lu |
This file contains 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
--[[ | |
function print_metric(metric, labels, value) | |
local label_string = "" | |
if labels then | |
for label,value in pairs(labels) do | |
label_string = label_string .. label .. '="' .. value .. '",' | |
end | |
label_string = "{" .. string.sub(label_string, 1, -2) .. "}" | |
end | |
io.write(string.format("%s%s %s", metric, label_string, value)) |
This file contains 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 python | |
# encoding: utf-8 | |
import tornado.ioloop | |
import tornado.web | |
import tornado.log | |
import tornado.httpserver | |
from tornado.options import define, options | |
import logging | |
import tornado.gen |
This file contains 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
require 'formula' | |
class Sshpass < Formula | |
url 'http://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz' | |
homepage 'http://sourceforge.net/projects/sshpass' | |
sh256 'c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60' | |
def install | |
system "./configure", "--disable-debug", "--disable-dependency-tracking", | |
"--prefix=#{prefix}" |
This file contains 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
# coding: utf-8 | |
try: | |
import cPickle as pickle | |
except ImportError: | |
import pickle | |
try: | |
import hashlib | |
sha1 = hashlib.sha1 |
This file contains 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 ( | |
"archive/tar" | |
"bytes" | |
"compress/gzip" | |
"crypto/sha1" | |
"crypto/sha512" | |
"encoding/base64" | |
"encoding/hex" |
This file contains 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
ssh-keygen -f id_rsa -m pem -p |
NewerOlder