Prerequisites: Using internal-sftp for sftp; rsyslog for logging
Step 1. Set up your chrooted directories
sudo mkdir /sftp/myshare
sudo mkdir /sftp/myothershare
Step 2. Create your groups for your chrooted users
<?php | |
/** | |
* @param $baseUrl - non protected part of the URL including hostname, e.g. http://example.com | |
* @param $path - protected path to the file, e.g. /downloads/myfile.zip | |
* @param $secret - the shared secret with the nginx server. Keep this info secure!!! | |
* @param $ttl - the number of seconds until this link expires | |
* @param $userIp - ip of the user allowed to download | |
* @return string | |
*/ |
// bower install crypto-js | |
// Add to scripts to html file | |
// <script src="bower_components/crypto-js/crypto-js.js"></script> | |
// <script src="bower_components/crypto-js/pbkdf2.js"></script> | |
function auth(password) { | |
// Make a salt with CryptoJS.lib.WordArray.random(128/8); | |
var salt = 'your salt'; // CryptoJS.lib.WordArray.random(128/8); | |
// 1000 iterations takes a couple seconds in the browser. Wouldn't want to go much higher if this is a browser implementation |
<?php | |
echo '<pre>'; | |
echo '<span style="color:blue">DOWNLOADING...</span>'.PHP_EOL; | |
// Download file | |
file_put_contents('wp.zip', file_get_contents('https://wordpress.org/latest.zip')); | |
$zip = new ZipArchive(); | |
$res = $zip->open('wp.zip'); | |
if ($res === TRUE) { |
I got the speakers working on my Asus Zenbook 14 OLED UX3402, the one with Intel CPU and the two CS35L41
audio amplifiers connected over SPI (not the UM3402YA, with AMD and I²C). The amplifiers are supported by the snd_hda_scodec_cs35l41
module in recent kernel versions, but they require some model-specific configuration paramaters, that should be provided by the BIOS, via ACPI. Of course, they are missing. It seems that the Windows drivers have those parameters somehow hardcoded, instead of using ACPI (bad idea, but who am I to criticise). Since Asus has been nasty and refused/was not able to update the BIOS with the missing data, I have patched the ACPI tables myself.
Warning
As stated by Cirrus developers, if you try this there is a non-zero (low, I hope) possibility of