sudo apt-get install python-setuptoolswget http://downloads.sourceforge.net/project/s3tools/s3cmd/1.5.0-alpha1/s3cmd-1.5.0-alpha1.tar.gztar xvfz s3cmd-1.5.0-alpha1.tar.gzcd s3cmd-1.5.0-alpha1python setup.py installs3cmd --configure
This file contains hidden or 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
| /** | |
| * SVG Fixer | |
| * | |
| * Fixes references to inline SVG elements when the <base> tag is in use. | |
| * Firefox won't display SVG icons referenced with | |
| * `<svg><use xlink:href="#id-of-icon-def"></use></svg>` when the <base> tag is on the page. | |
| * | |
| * More info: | |
| * - http://stackoverflow.com/a/18265336/796152 | |
| * - http://www.w3.org/TR/SVG/linking.html |
This file contains hidden or 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 mediaJSON = { "categories" : [ { "name" : "Movies", | |
| "videos" : [ | |
| { "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
| "subtitle" : "By Blender Foundation", | |
| "thumb" : "images/BigBuckBunny.jpg", | |
| "title" : "Big Buck Bunny" | |
| }, | |
| { "description" : "The first Blender Open Movie from 2006", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
This file contains hidden or 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 | |
| // Usage: <img src="placeholder-svg.php?wh=400x400&fill=bada55&color=000000&font=Georgia&size=20" /> | |
| $wh = explode('x', $_GET['wh']); | |
| $wh[0] = (int)$wh[0]; | |
| $wh[1] = (int)$wh[1]; | |
| $fill = isset($_GET['fill']) ? $_GET['fill']: '666666'; | |
| $color = isset($_GET['color']) ? $_GET['color']: 'FFFFFF'; | |
| $size = isset($_GET['size']) ? (int)$_GET['size']: 60; | |
| $fontfamily = isset($_GET['font']) ? $_GET['font']: 'Arial'; | |
| header('Content-Type: image/svg+xml'); |
This file contains hidden or 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
| from zeep import Client | |
| import sys | |
| import os | |
| # WSDL = 'https://arss.arubapec.it/ArubaSignService/ArubaSignService?wsdl' | |
| # Se il servizio ATP è installato sul proprio server mio.server.example.org: | |
| WSDL = 'https://mio.server.example.org/ArubaSignService/ArubaSignService?wsdl' | |
| document = sys.argv[1] | |
| otp = sys.argv[2] |
This file contains hidden or 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 | |
| // API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = array( $_GET['id'] ); | |
| // prep the bundle | |
| $msg = array |
This file contains hidden or 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 | |
| /* Getting a JSON Facebook Feed | |
| ========================================================================== | |
| 1. Sign in as a developer at https://developers.facebook.com/ | |
| 2. Click "Create New App" at https://developers.facebook.com/apps | |
| 3. Under Apps Settings, find the App ID and App Secret |
This file contains hidden or 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
| function slugify(text) | |
| { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - | |
| .replace(/^-+/, '') // Trim - from start of text | |
| .replace(/-+$/, ''); // Trim - from end of text | |
| } |
This file contains hidden or 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 | |
| /* | |
| A quick set of functions to move items in a non-associative array | |
| up or down by one, shifting the items around it appropriately. | |
| Original usage was to for a set of UP and DOWN buttons to | |
| manipulate the order of an array of items stored in Wordpress option. | |
| */ | |
| $a = array('a','b','c','d','e'); |