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
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
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
/* eslint-disable @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any */ | |
import { ChatReconnectIconBase64, CloseChatButtonIconBase64, ModernChatIconBase64, ProactiveChatBannerBase64 } from "@microsoft/omnichannel-chat-components"; | |
import { ILiveChatWidgetProps } from "../../interfaces/ILiveChatWidgetProps"; | |
import { ITelemetryConfig } from "../../../../common/telemetry/interfaces/ITelemetryConfig"; | |
import MockAdapter from "../../../webchatcontainerstateful/common/mockadapter"; | |
import { NewMessageNotificationSoundBase64 } from "../../../../assets/Audios"; | |
import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk"; | |
import { WebChatStoreLoader } from "../../../webchatcontainerstateful/webchatcontroller/WebChatStoreLoader"; |
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/expect | |
# Install for MacOSX | |
# brew install expect | |
# touch /usr/local/bin/exssh | |
# chmod +x /usr/local/bin/exssh | |
set timeout 30 | |
set userhost [lindex $argv 0] | |
set password [lindex $argv 1] |
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/bash | |
! hash php 2>/dev/null && echo "PHP Required" && exit | |
# Download Official Loader Wizard for | |
curl -O https://www.ioncube.com/loader-wizard/loader-wizard.tgz | |
tar zxvf loader-wizard.tgz | |
cat ./ioncube/loader-wizard.php | sed 's/run();/#run();/g' | sed "s/'mac'/'dar'/g" > ./loader-wizard.php | |
# PHP Setting |
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
FROM markoshust/magento-php:7.2-fpm | |
USER root | |
# Remove Wrong PHP extension ini | |
RUN rm -f /usr/local/etc/php/conf.d/00_docker-php-ext-ioncube_loader_lin_7.2.ini | |
RUN cd /tmp \ | |
&& curl -O https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \ | |
&& tar zxvf ioncube_loaders_lin_x86-64.tar.gz \ |
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
#include<iostream> | |
#include<iomanip> | |
#include<string> | |
#include<limits> | |
using namespace std; | |
#define SIZEOF(x) cout << \ | |
setw(24) << #x << \ | |
setw(9) << sizeof(x) << \ | |
setw(21) << (numeric_limits<x>::max)() << \ |
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
#include "stringprintf.h" | |
static void StringAppendV(string* dst, const char* format, va_list ap) { | |
// First try with a small fixed size buffer | |
char space[1024]; | |
// It's possible for methods that use a va_list to invalidate | |
// the data in it upon use. The fix is to make a copy | |
// of the structure before using it and use that copy instead. | |
va_list backup_ap; |
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
/***** macro foreach *****/ | |
#define EASY_FOREACH(it, container) \ | |
for(typeof((container).begin()) it = (container).begin();it != (container).end(); ++it) | |
/***** qt foreach *****/ | |
template <typename T> | |
class ForeachContainer { | |
public: | |
inline ForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { } |
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 | |
# Shell script to install your public key on a remote machine | |
# Takes the remote machine name as an argument. | |
# Obviously, the remote machine must accept password authentication, | |
# or one of the other keys in your ssh-agent, for this to work. | |
ID_FILE="${HOME}/.ssh/id_rsa.pub" | |
if [ "-i" = "$1" ]; then |
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 | |
usage () { | |
echo "Usage: $0 [-i [identity_file]] [user@]machine" | |
exit 1 | |
} | |
# Parse options | |
while getopts ":i:" o | |
do case "$o" in |