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
document.getElementById('ctl00_secframe').contentWindow.print(); |
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
<?php | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://api.dropboxapi.com/2/files/list_folder'); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array( | |
'Authorization: Bearer MY_DROPBOX_ACCESS_KEY', | |
'Content-Type: application/json', | |
'Accept: application/json' | |
)); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
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
$app->after(function(Request $request, Response $response){ | |
$access_whitelist = array('https://domain1.com', 'https://domain2.com', 'https://domain3.com'); | |
if(in_array($_SERVER['HTTP_ORIGIN'], $access_whitelist)) | |
$response->headers->set('Access-Control-Allow-Origin', $_SERVER['HTTP_ORIGIN']); | |
}); |
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
$('[ng-repeat="invoices in grouped_invoices"]').each(function(){ | |
var total = 0; | |
$(this).find('.invoice_card_amount_number').each(function(){ | |
total += parseInt($(this).text().replace(',','').replace('.00','')); | |
}); | |
$(this).find('h2.lighter').text($(this).find('h2.lighter').text()+' (£'+total+')'); | |
}); |
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
sudo /etc/init.d/mysql stop | |
sudo mkdir /var/run/mysqld/ | |
sudo chown mysql /var/run/mysqld/ | |
sudo mysqld_safe --skip-grant-tables & | |
mysql -u root | |
use mysql; | |
update user set authentication_string = PASSWORD(""), plugin = "mysql_native_password" where User='root'; | |
flush privileges; | |
quit; | |
sudo /etc/init.d/mysql stop |
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
var a = fetch("http://path/to/audio.wav") | |
.then(res => { | |
var reader = res.body.getReader(); | |
return reader.read().then(result => { | |
return result; | |
}); | |
}) | |
.then(data => { | |
console.log(data); |