Skip to content

Instantly share code, notes, and snippets.

function __mq_datfile_decode_data (buffer) {
const __bar_full = (view, addr, open = view.getUint32 (addr + 4, true)) => ({
time: (new Date (view.getUint32 (addr, true) * 1000)).getTime (),
open,
high: open + view.getUint16 (addr + 8, true),
low: open - view.getUint16 (addr + 10, true),
close: open + view.getInt16 (addr + 12, true),
volume: view.getUint16 (addr + 14, true)
});
$source = "source"
$server = "http://server/?ping"
$username = "user"
$password = "pass"
$clusterProcesses = Get-Process -Name cluster* | Select-Object -Property Name, Id, MainWindowTitle, WS
$processDetailsList = @()
foreach ($process in $clusterProcesses) {
$memorySizeMB = [math]::Round($process.WS / 1MB, 2)
FROM debian:stable-slim
############################################################################################################
ARG BUILD_DATE
LABEL maintainer="https://gfic.limited"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.build-date=$BUILD_DATE
FROM python:3.9-alpine
############################################################################################################
RUN set -ex; \
apk add --update --no-cache build-base linux-headers && \
pip3 install --no-cache-dir --upgrade flask==2.0.2 requests==2.26.0 gunicorn==20.1.0 Werkzeug==2.0.2 psutil && \
apk del build-base linux-headers && \
apk cache clean && \
@matthewgream
matthewgream / ukrikashus.php
Created October 21, 2023 10:38
ulrikashus
<?php
const PASSWORD = "branna";
session_start ();
if (isset ($_POST ['submit_pass']) && $_POST ['pass']) {
$pass = $_POST ['pass'];
if ($pass == PASSWORD) {
$_SESSION ['the_password'] = $pass;
} else {
$error = "Incorrect Password";
}
// ------------------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------------------
#include "common.h"
#include "common_config.h"
#include "common_ioplus.h"
#include "sys/time.h"
// -----------------------------------------------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------------------------------------------
function code_filter_for_gcloud (v) {
return !v.includes ('CODE' + ':' + 'GCLOUD');
}
// -----------------------------------------------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------------------------------------------
const GCLOUD_DEFAULT_CONFIG = {
'location': 'us-central1',
'project' : APPLICATION_PROJECT,
'service' : APPLICATION_NAME + '-appsscript-app',
'jobname' : APPLICATION_NAME + '-appsscript-job',
'storage' : APPLICATION_NAME + '-appsscript-bld',
// -----------------------------------------------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------------------------------------------
// https://cloud.google.com/storage/docs/gcsfuse-quickstart-mount-bucket
function gcloud_storage_test () { __TEST_SETUP ();
}
// -----------------------------------------------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------------------------------------------
function gcloud_network_test () { __TEST_SETUP ();
debugLog (gcloud_dns_zone_info ());
gcloud_dns_zone_record_list ().forEach (r => debugLog (util_obj_strNiceOrdered (r, ['kind', 'name', 'type', 'ttl', 'rrdatas' ])));
// debugLog (gcloud_dns_zone_record_insert ('vps5.msmv2.gfic.limited.', 'A', '185.126.69.231'));
// var x = __gcloud_request ('https://domains.googleapis.com/v1/projects/gfic-website/locations/us-central1');