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 requests # for getting URL | |
import json # for parsing json | |
from datetime import datetime # datetime parsing | |
import pytz # timezone adjusting | |
import xmlschema | |
################################################################# | |
# USER VARIABLES |
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
//Paul Tero, July 2001 | |
//http://www.tero.co.uk/des/ | |
// | |
//Optimised for performance with large blocks by Michael Hayworth, November 2001 | |
//http://www.netdealing.com | |
// | |
//THIS SOFTWARE IS PROVIDED "AS IS" AND | |
//ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
//ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
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 'Mysql2' | |
require 'json' | |
require 'mongo' | |
namespace :db do | |
task :backup do | |
client = Mysql2::Client.new(:host => "localhost", :socket => '/Applications/MAMP/tmp/mysql/mysql.sock', :username => "root", :database => "elrinconecologico_db", :password => "root") | |
mongo_client = Mongo::Client.new('mongodb://127.0.0.1:27017/database') | |
products = client.query("SELECT * FROM wp_posts where post_type='product' and post_name <> ''") | |
products.each do |product| |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ |
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 'socket' # Get sockets from stdlib | |
server = TCPServer.open(5000) # Socket to listen on port 2000 | |
counter = 0; | |
loop do | |
client = server.accept # Wait for a client to connect | |
while line = client.gets # Read lines from socket | |
puts line # and print them | |
end | |
client.puts "Hello this is a test by oscar #{counter}" |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using YamlDotNet.Serialization; | |
namespace YamlDotNet.Samples | |
{ | |
public class SerializeObjectGraph | |
{ |