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
| /** | |
| * Load Elasticseach PHP 7 Client via composer | |
| * Updated for ElasticPress 3.3 | |
| */ | |
| require 'vendor/autoload.php'; | |
| /** | |
| * Init Elasticsearch PHP Client | |
| */ | |
| use Elasticsearch\ClientBuilder; |
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
| #!/bin/bash | |
| if [[ $# -ne 2 ]]; then | |
| echo "Must only have two arguments, the URL and the collection" >&2 | |
| exit 1 | |
| fi | |
| if [[ ! -d "/var/spool/openwayback/files2/${2}" ]]; then | |
| mkdir "/var/spool/openwayback/files2/${2}" | |
| fi |
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
| [ | |
| { | |
| "url": "http://money.cnn.com", | |
| "rss": "http://rss.cnn.com/rss/money_topstories.rss" | |
| }, | |
| { | |
| "url": "http://thehill.com", | |
| "rss": "http://thehill.com/rss/syndicator/19110" | |
| }, | |
| { |
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 | |
| if(!isset($_GET['url'])) { | |
| ?> | |
| <form action="" method="get"> | |
| <input type="url" name="url"> | |
| <input type="submit" value="Go"> | |
| </form> | |
| <? | |
| die(); | |
| } |
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
| #!/bin/bash | |
| # copymysql.sh | |
| # GENERATED WITH USING ARTUR BODERA'S SCRIPT | |
| # Source script at: https://gist.github.com/2215200 | |
| MYSQLDUMP="/usr/bin/mysqldump" | |
| MYSQL="/usr/bin/mysql" |
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
| #!/bin/bash | |
| # Install WordPress | |
| # ================= | |
| # Based on many sources, but originally based on: | |
| # @ http://premium.wpmudev.org/blog/set-up-wordpress-like-a-pro/ | |
| # See also: http://wprealm.com/blog/wordpress-wp-cli-kung-fu-made-simple/ | |
| # BEGIN Configuration |
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 | |
| /* | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2014 Christopher Tombleson <chris@cribznetwok.com> | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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 request = require('request'); | |
| var unzip = require('unzip'); | |
| var csv2 = require('csv2'); | |
| request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip') | |
| .pipe(unzip.Parse()) | |
| .on('entry', function (entry) { | |
| entry.pipe(csv2()).on('data', console.log); | |
| }) | |
| ; |
NewerOlder