Skip to content

Instantly share code, notes, and snippets.

Msg: noVNC ready: native WebSockets, canvas rendering
util.js:218
util.js:218 Msg: Starting VNC handshake
util.js:218 Msg: Sent ProtocolVersion: 003.008
util.js:218 Msg: Authenticating using scheme: 16
util.js:218 WebSocket on-close event
util.js:220 Msg: Server disconnected (code: 1006)Util.Error @ util.js:220RFB._updateState @ rfb.js:496RFB._fail @ rfb.js:566(anonymous function) @ rfb.js:231(anonymous function) @ websock.js:320
util.js:218
root@nag1-ord6:~# ./idrac-raid.pl -u root -h <SECRET> -p <NOPE>
PERC H730 Mini (RAID.Integrated.1-1)
|--FW Rev: 25.2.2-0004
|--Primary Status: OK
|--Rollup Status: Degraded
|--Battery Status: Degraded
|--RAID LV Status: OK
|
|--Virtual Disk 0
| |--RAID Type: RAID1
my $ua = Mojo::UserAgent->new();
# Add completely non-standard Authorization: HTTP header to each request
$ua->on(start => sub {
my ($ua, $tx) = @_;
$tx->req->headers->header('Authorization' => $auth_header);
# Print (naive) curl output if desired
if ($curl_debug) {
my $h = $tx->req->headers->to_hash;
[edit]
root@srx3600n0# show security nat
static {
rule-set Static-NAT {
from zone untrust;
rule FTP-v4 {
match {
destination-address 198.18.5.6/32;
}
then {
sub download_file {
my ( $self, $file ) = @_;
my $file_path = "/storage/mirrors/supermicro/" . $file->{'filename'};
my $ua = Mojo::UserAgent->new();
my $tx = $ua->get($file->{'url'});
$tx->res->content->asset->move_to($file_path);
}
@phil21
phil21 / backup-github.sh
Created February 23, 2017 00:46 — forked from rodw/backup-github.sh
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
# NOTE: if you have more than 100 repositories, you'll need to step thru the list of repos
# returned by GitHub one page at a time, as described at https://gist.github.com/darktim/5582423
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)