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
INFO: analyzing "profile.servers" | |
INFO: "servers": scanned 1 of 1 pages, containing 1 live rows and 9 dead rows; 1 rows in sample, 1 estimated total rows | |
INFO: analyzing "profile.samples" | |
INFO: "samples": scanned 1 of 1 pages, containing 8 live rows and 33 dead rows; 8 rows in sample, 8 estimated total rows | |
INFO: analyzing "profile.baselines" | |
INFO: "baselines": scanned 0 of 0 pages, containing 0 live rows and 0 dead rows; 0 rows in sample, 0 estimated total rows | |
INFO: analyzing "profile.bl_samples" | |
INFO: "bl_samples": scanned 0 of 0 pages, containing 0 live rows and 0 dead rows; 0 rows in sample, 0 estimated total rows | |
INFO: analyzing "profile.sample_stat_cluster" | |
INFO: "sample_stat_cluster": scanned 1 of 1 pages, containing 8 live rows and 33 dead rows; 8 rows in sample, 8 estimated total rows |
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 | |
FREEBSD_VERSION=13 | |
NUMBER_OF_CORES=`sysctl -n hw.ncpu` | |
ZPOOL="zroot" | |
START=$(date +%s) | |
if [ `sysctl -n kern.securelevel` -gt 0 ]; then | |
sysrc kern_securelevel_enable="NO" | |
echo "need to reboot with securelevel 0" | |
exit |
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/python3 | |
""" | |
Copyright 2021 Mygod | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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 bash | |
# Delete workflow runs - dwr | |
# Given an "owner/repo" name, such as "qmacro/thinking-aloud", | |
# retrieve the workflow runs for that repo and present them in a | |
# list. Selected runs will be deleted. Uses the GitHub API. | |
# Requires gh (GitHub CLI) and jq (JSON processor) |
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
use futures::stream::TryStreamExt; | |
use ring::digest::{Context, SHA256}; | |
use std::error::Error; | |
use std::fmt::Write; | |
use std::time::Instant; | |
use tokio::fs::File; | |
use tokio::io::AsyncBufRead; | |
use tokio::io::BufReader; | |
// use tokio::prelude::*; | |
use tokio_util::codec::{BytesCodec, FramedRead}; |
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
""" Example for adding a file into a blob | |
CREATE TABLE test ( | |
id INT AUTO_INCREMENT, | |
data LONGBLOB NOT NULL, | |
PRIMARY KEY (id) | |
); | |
pip install --upgrade --user mysqlclient | |
""" |
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
# Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/ | |
# Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date. | |
################################################################## | |
Installing and Configuring SmartOS on a budget server (with a /29) | |
################################################################## | |
# if you find this gist useful, please star it | |
# please be aware that budget hosting companies usually cut corners somewhere, |
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(newDoc, oldDoc, userCtx, secObj) { | |
var ddoc = this; | |
secObj.admins = secObj.admins || {}; | |
secObj.admins.names = secObj.admins.names || []; | |
secObj.admins.roles = secObj.admins.roles || []; | |
var IS_DB_ADMIN = false; | |
if(~ userCtx.roles.indexOf("_admin")) | |
IS_DB_ADMIN = true; | |
if(~ secObj.admins.names.indexOf(userCtx.name)) | |
IS_DB_ADMIN = true; |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQINBFdcWLYBEACtY37dvmeb1bmPvPObd+XpwA5/B00LokDqPXRpcCpznIhMNIQQ | |
KTzThNOm73qSuP4vweu0fS6rndf4hEukKG420RXQHFsj/4TFdTFtNcVr4eTXDFn3 | |
LNlYod0QeEdoL3EjKDx03XeMAin/Zrg8kiGHW3zOvsu3DkpnDJZbMqcwKSWcx4E0 | |
WzUVlh2oQFF8QIWQjCY+sTAWXuCLZtjIPrlgBPTfa1tZjNDGZHvma29ioGcmTxbM | |
6nyfP45h2BLPnjCrKo/s/rKPBS8fl7A1X/LQ4ljQmj6W+n/BIL9o5ufy6KNYOfKW | |
HFif/JRx/C8dE8StCbSiRcuBJlFyMG8q8lMFmHwSnn/T27nnQN4uQV2sBiOjMXO6 | |
NWXMRvHZRPj1gnvDtIbSMqCIU8s87sHNTeUBoM49UKdVsfZ34nd2I+h19cS0OQDg | |
yQSsKoXtW/LSnngEX7SKgeO/M2n6iMcGKdpl7WOSLlSBIgFQSOJcSC8mMs54Dk1D |
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 ( | |
"crypto/subtle" | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
"github.com/nbari/violetear" |
NewerOlder