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
| import ConfigParser | |
| import sys | |
| from datetime import datetime | |
| import MySQLdb | |
| import ccxt | |
| exchanges = ['binance', 'bitfinex', 'bittrex', 'hitbtc', 'poloniex'] | |
| exchanges_id = { | |
| 'binance': 5, |
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
| { | |
| "id": "urn:uuid:bbba8553-8ec1-445f-82c9-a57251dd731c", | |
| "issuedOn": "2019-06-26T14:58:57.461422+00:00", | |
| "badge": { | |
| "id": "urn:uuid:82a4c9f2-3588-457b-80ea-da695571b8fc", | |
| "name": "Posgrado en Marketing Digital", | |
| "image": "data:image/png;base64,...", | |
| "description": "Lorem ipsum dolor sit amet, mei docendi concludaturque ad, cu nec partem graece. Est aperiam consetetur cu, expetenda moderatius neglegentur ei nam, suas dolor laudem eam an.", | |
| "criteria": { | |
| "narrative": "Nibh iriure ei nam, modo ridens neglegentur mel eu. At his cibo mucius." |
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 WPAPI = require('wpapi'); | |
| var wp = new WPAPI({ | |
| endpoint: 'https://premiumhouses.com/wp-json', | |
| username: 'mike', | |
| password: 'nokia123', | |
| // auth: true | |
| }); | |
| // wp.property = wp.registerRoute('wp/v2', '/estate_property'); |
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
| const request = require('request'); | |
| var requestLoop = setInterval(function () { | |
| request({ | |
| url: "https://premiumhouses.com/wp-cron.php?import_key=6LGqcS1&import_id=29&action=processing", | |
| method: "GET", | |
| timeout: 10000, | |
| followRedirect: true, | |
| maxRedirects: 10 |
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 parseString = require('xml2js').parseString; | |
| var http = require('http'); | |
| const createCsvWriter = require('csv-writer').createObjectCsvWriter; | |
| var _ = require('lodash'); | |
| var moment = require('moment'); | |
| function xmlToJson(url, callback) { | |
| var req = http.get(url, function (res) { | |
| var xml = ''; | |
| res.on('data', function (chunk) { |
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 parseString = require('xml2js').parseString; | |
| var http = require('http'); | |
| const createCsvWriter = require('csv-writer').createObjectCsvWriter; | |
| var _ = require('lodash'); | |
| var moment = require('moment'); | |
| function xmlToJson(url, callback) { | |
| var req = http.get(url, function (res) { | |
| var xml = ''; | |
| res.on('data', function (chunk) { |
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
| packages: | |
| yum: | |
| ImageMagick: [] | |
| ImageMagick-devel: [] | |
| container_commands: | |
| 01-wget: | |
| command: "wget -O /tmp/ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/release-source" | |
| 02-mkdir: | |
| command: "if [ ! -d /opt/ffmpeg ] ; then mkdir -p /opt/ffmpeg; fi" | |
| 03-tar: |
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
| # Taken from https://forums.aws.amazon.com/thread.jspa?messageID=332091 | |
| # And https://gist.github.com/rainabba/07425c3bc14a0bb51632f12e913d9081 | |
| # | |
| # Usage: `sudo bash ./install_ffmpeg.sh` | |
| # Config Variables | |
| static_host=https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz | |
| filename=ffmpeg-git-64bit-static.tar.xz | |
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/sh | |
| # Based on gist.github.com/gboudreau/install-ffmpeg-amazon-linux.sh | |
| # and https://trac.ffmpeg.org/wiki/CompilationGuide/Centos | |
| if [ "`/usr/bin/whoami`" != "root" ]; then | |
| echo "You need to execute this script as root." | |
| exit 1 | |
| fi | |
| cat > /etc/yum.repos.d/centos.repo<<EOF |
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
| packages: | |
| yum: | |
| libjpeg-turbo-devel: [] | |
| libpng-devel: [] | |
| libcurl-devel: [] | |
| commands: | |
| 01_install_rhel_pg: | |
| command: "(yum repolist |grep -q pgdg96) || sudo yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-ami201503-96-9.6-2.noarch.rpm -y" | |
| 02_install_pg_devel: |