This file contains hidden or 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
<?php | |
# Requires PHP 5.5 | |
$ch = curl_init("https://sqs.eu-central-1.amazonaws.com/"); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
#curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
echo curl_exec($ch); | |
if($errno = curl_errno($ch)) { |
This file contains hidden or 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
<?php | |
$keyConfig = [ | |
'private_key_type' => OPENSSL_KEYTYPE_RSA, | |
'private_key_bits' => 2048, | |
]; | |
$key = openssl_pkey_new($keyConfig); | |
$sanDomains = [ | |
'mydomain.tld', |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hello Node Webkit</title> | |
</head> | |
<body> | |
<div id="my"></div> | |
<script> | |
var ctx = document.getElementById('my'); | |
var image = new Image(); |
This file contains hidden or 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
<?php | |
require_once __DIR__ . '/vendor/autoload.php'; | |
use X509\CertificationRequest\CertificationRequest; | |
use X509\CertificationRequest\Attribute\ExtensionRequestValue; | |
use X509\Certificate\Extension\SubjectAlternativeNameExtension; | |
use X509\GeneralName\DNSName; | |
use CryptoUtil\PEM\PEM; |
This file contains hidden or 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 httpd | |
RUN apt-get update && apt-get install -y \ | |
wget \ | |
automake \ | |
build-essential \ | |
ssl-cert \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN make-ssl-cert generate-default-snakeoil |
This file contains hidden or 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 | |
function ostype() { | |
unameOut="$(uname -s)" | |
case "${unameOut}" in | |
Linux*) machine=Linux;; | |
Darwin*) machine=Mac;; | |
CYGWIN*) machine=Cygwin;; | |
MINGW*) machine=MinGw;; | |
*) machine="UNKNOWN:${unameOut}" |
This file contains hidden or 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 chunked_encoding(socket, data) | |
local chunk_size = 1024 | |
-- Iterate over the data in chunks of chunk_size | |
for i = 1, #data, chunk_size do | |
local chunk = data:sub(i, i + chunk_size - 1) | |
-- Calculate the length of the chunk in hexadecimal format | |
local length = string.format("%X\r\n", #chunk) |
OlderNewer