This file contains 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 | |
interface="eth0" | |
hosts=`vagrant status | grep running | awk '{print $1}'` | |
if [ `echo ${hosts} | wc -w` -gt '0' ] | |
then | |
for host in ${hosts} | |
do | |
ip=`echo "ip a sh dev ${interface} | grep 'inet ' | sed 's/\// /g'" | vagrant ssh ${host} | awk '{print $2}'` |
This file contains 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
require 'uri' | |
require 'net/http' | |
url = URI("http://www.hostelspoint.com/webservices/affiliates/json.php?IDSite=2336&requestType=AvailSearchCity&day=11&year_month=2016-11&nights=1&guests=1¤cy=EUR&cat=&lang=en&order=&room_type=&city=190") | |
http = Net::HTTP.new(url.host, url.port) | |
request = Net::HTTP::Get.new(url) | |
request["cache-control"] = 'no-cache' |
This file contains 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
require 'uri' | |
require 'openssl' | |
require 'net/http' | |
url = URI("https://www.hostelspoint.com/xml/xml.php") | |
http = Net::HTTP.new(url.host, url.port) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_NONE |
This file contains 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
require 'uri' | |
require 'openssl' | |
require 'net/http' | |
url = URI("https://www.hostelspoint.com/xml/xml.php") | |
http = Net::HTTP.new(url.host, url.port) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_NONE |
This file contains 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
require 'uri' | |
require 'openssl' | |
require 'net/http' | |
url = URI("https://www.hostelspoint.com/xml/xml.php") | |
http = Net::HTTP.new(url.host, url.port) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_NONE |
This file contains 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
#!/usr/bin/env python3 | |
import urllib3 | |
import certifi | |
import sys | |
# Generate a bot ID here: https://core.telegram.org/bots#botfather | |
bot_id = '' | |
chat_id = '' |
This file contains 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
#!/usr/bin/env python | |
import requests | |
file = "url_list.csv" | |
with open(file, 'r') as f: | |
for line in f: | |
line += ' ' | |
url = line.split(' ')[0].strip() |
This file contains 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 | |
git for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D |
This file contains 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
# FusionAuth database has tables which don't have primary keys this is a problem from the Digital Ocean perspective, | |
# because they are using row-based replication with the MySQL engine to provide backups and read replicas. | |
# We have migrated 2 environments, from MySQL 8 to PostgreSQL 12 | |
# pgloader help | |
docker run --rm --name pgloader dimitri/pgloader:latest pgloader --help | |
# run pgloader | |
docker run --rm --name pgloader dimitri/pgloader:latest pgloader --no-ssl-cert-verification --verbose --debug \ | |
"mysql://odyssey-auth:${mysql_password}@${digitalocean_mysql_host}:25060/odyssey-auth" |
This file contains 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
-- | |
-- Change database owner | |
-- | |
ALTER DATABASE "db_name" OWNER TO user; | |
-- | |
-- List schemas | |
-- |
OlderNewer