jq is useful to slice, filter, map and transform structured json data.
brew install jq
| var touchstartX = 0; | |
| var touchstartY = 0; | |
| var touchendX = 0; | |
| var touchendY = 0; | |
| var gesuredZone = document.getElementById('gesuredZone'); | |
| gesuredZone.addEventListener('touchstart', function(event) { | |
| touchstartX = event.screenX; | |
| touchstartY = event.screenY; |
| <?php | |
| /** | |
| * Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products | |
| * Plugin URI: https://gist.github.com/BFTrick/7873168 | |
| * Description: Remove the billing address fields for free virtual orders | |
| * Author: Patrick Rauland | |
| * Author URI: http://patrickrauland.com/ | |
| * Version: 2.0 | |
| * | |
| * This program is free software: you can redistribute it and/or modify |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| <?php | |
| //where you want your thumbnails to go | |
| $thumbs_dir = 'uploads/thumbs/'; | |
| //this should be an array of video paths | |
| $videos = array(); | |
| if( $_POST["name"] ){ | |
| // Grab the MIME type and the data with a regex for convenience | |
| if (!preg_match('/data:([^;]*);base64,(.*)/', $_POST['data'], $matches)) { |
| serialize: function serialize(form) | |
| { | |
| if (!form || form.nodeName !== "FORM") { | |
| return; | |
| } | |
| var i, j, | |
| obj = {}; | |
| for (i = form.elements.length - 1; i >= 0; i = i - 1) { | |
| if (form.elements[i].name === "") { | |
| continue; |
| /** | |
| * Get YouTube ID from various YouTube URL | |
| * @author: takien | |
| * @url: http://takien.com | |
| * For PHP YouTube parser, go here http://takien.com/864 | |
| */ | |
| function YouTubeGetID(url){ | |
| var ID = ''; | |
| url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/); |
| <?php | |
| /* * | |
| * @filename downloader.class.php | |
| * @author PsyKzz | |
| * @version 1.0.0 | |
| * @description Simple class to rate limit your downloads, while also providing a custom tickrate to combat timeout issues. | |
| * @url http://www.psykzz.co.uk | |
| * | |
| * @license 'WTFPL ' - "Do What The Fuck You Want To Public License". | |
| * This program is free software. It comes without any warranty, to |
| LOWER(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(TRIM('My String'), ':', ''), ')', ''), '(', ''), ',', ''), '\\', ''), '\/', ''), '\"', ''), '?', ''), '\'', ''), '&', ''), '!', ''), '.', ''), ' ', '-'), '--', '-'), '--', '-')) AS `post_name` |