#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
| #!/usr/bin/env python | |
| """ | |
| Extract title from PDF file. | |
| Depends on: pyPDF, PDFMiner. | |
| Usage: | |
| find . -name "*.pdf" | xargs -I{} pdftitle -d tmp --rename {} |
| // Run from the dev tools console of any Youtube video | |
| // Accurate as of October 28, 2016. Uses quality + video type for naming now, | |
| // prevents video urls being overwritten. | |
| // ES6 version | |
| const videoUrls = ytplayer.config.args.url_encoded_fmt_stream_map | |
| .split(',') | |
| .map(item => item | |
| .split('&') | |
| .reduce((prev, curr) => (curr = curr.split('='), |
| <?php | |
| public function postBounceOrComplaint(Request $request, Mailer $mailer){ | |
| Log::info($request->json()->all()); | |
| if($request->json('Type') == 'SubscriptionConfirmation'){ | |
| $client = new Client(); | |
| $client->get($request->json('SubscribeURL')); | |
| return response()->json(); |
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
To connect to MSSQL using PHP 5.6 we'll need to use PDO's DBLIB (PDO_DBLIB) http://php.net/manual/en/ref.pdo-dblib.php and FreeTDS http://www.freetds.org/
This quick tutorial is using Ubuntu Server 14.04
First, make sure you're up to date on all of your packages.
sudo apt-get updatesudo apt-get upgradesudo apt-get dist-upgradeI'm using PHP 5.6.9 (https://launchpad.net/~ondrej/+archive/ubuntu/php5-5.6)
| # Mathieu Blondel, September 2010 | |
| # License: BSD 3 clause | |
| import numpy as np | |
| from numpy import linalg | |
| import cvxopt | |
| import cvxopt.solvers | |
| def linear_kernel(x1, x2): | |
| return np.dot(x1, x2) |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| ps auxwww|grep apns-task.php|grep -v grep |