Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \ | |
x11vnc |
### hostapd configuration file, loosely based on http://pisarenko.net/blog/2015/02/01/beginners-guide-to-802-dot-11ac-setup/ | |
### for Realtek RTL8812AU via driver https://github.com/abperiasamy/rtl8812AU_8821AU_linux | |
### and hostap 2.5 | |
### Operates at 135 Mbps in 802.11n/ht mode. iperf measures ~8.00 MBytes/sec 67.1 Mbits/sec | |
### I was not able to get 802.11ac/vht mode with additional side-channels configured with the driver. | |
ctrl_interface=/var/run/hostapd | |
ctrl_interface_group=0 | |
interface=wlan2 | |
driver=nl80211 |
# This grub.cfg file was created by Jamie Kurtz | |
# Detailed instructions for use will soon be found here: http://www.jamiekurtz.com | |
# Simplified instructions below | |
# Sample grub entries... https://wiki.archlinux.org/index.php/Multiboot_USB_drive | |
# Inspiration from here: http://www.pendrivelinux.com/boot-multiple-iso-from-usb-via-grub2-using-linux/ | |
# Simplified instructions... | |
# Make sure grub, grub-efi, and xorriso packages are installed and up-to-date | |
# In your terminal go to directory where want to create the USB image contents | |
# Run the following to create the necessary folder structure: |
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS | |
# Can retrieve cloudflare Domain id and list zone's, because, lazy | |
# Place at: | |
# /usr/local/bin/cf-ddns.sh |
/** | |
* ValidateSpanishID. Returns the type of document and checks its validity. | |
* | |
* Usage: | |
* ValidateSpanishID( str ); | |
* | |
* > ValidateSpanishID( '12345678Z' ); | |
* // { type: 'dni', valid: true } | |
* | |
* > ValidateSpanishID( 'B83375575' ); |
<?php | |
$certificateCAcer = '/certificate.cer'; | |
$certificateCAcerContent = file_get_contents($certificateCAcer); | |
/* Convert .cer to .pem, cURL uses .pem */ | |
$certificateCApemContent = '-----BEGIN CERTIFICATE-----'.PHP_EOL | |
.chunk_split(base64_encode($certificateCAcerContent), 64, PHP_EOL) | |
.'-----END CERTIFICATE-----'.PHP_EOL; |
Note: I've left some of the full package names in tact to show exactly where the class comes from. | |
#### Pull dependencies in using composer #### | |
//Example composer.json | |
{ | |
"require": { | |
"symfony/config" : "2.1.0", | |
"symfony/yaml" : "2.1.0", | |
"twig/twig": "1.9.0", |
/* | |
* RC4 symmetric cipher encryption/decryption | |
* | |
* @license Public Domain | |
* @param string key - secret key for encryption/decryption | |
* @param string str - string to be encrypted/decrypted | |
* @return string | |
*/ | |
function rc4(key, str) { | |
var s = [], j = 0, x, res = ''; |