Skip to content

Instantly share code, notes, and snippets.

View davidroyo's full-sized avatar
🎯
Focusing

David Royo davidroyo

🎯
Focusing
  • Barcelona, España
View GitHub Profile
@davidroyo
davidroyo / consulta.php
Created October 25, 2017 13:05
sql code doesn't work, but it does on phpmyadmin
<?php
class consultasql {
private $servername;
private $dbuser;
private $dbpasswd;
private $db;
[06-Jun-2017 18:52:22 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_escape_string() in /home/rentatsr/public_html/wp-content/themes/child/functions.php:60
Stack trace:
#0 /home/rentatsr/public_html/wp-settings.php(423): include()
#1 /home/rentatsr/public_html/wp-config.php(93): require_once('/home/rentatsr/...')
#2 /home/rentatsr/public_html/wp-load.php(37): require_once('/home/rentatsr/...')
#3 /home/rentatsr/public_html/wp-blog-header.php(13): require_once('/home/rentatsr/...')
#4 /home/rentatsr/public_html/index.php(17): require('/home/rentatsr/...')
#5 {main}
thrown in /home/rentatsr/public_html/wp-content/themes/child/functions.php on line 60
[06-Jun-2017 18:53:24 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_escape_string() in /home/rentatsr/public_html/wp-content/themes/child/functions.php:60
@davidroyo
davidroyo / gist:1259f1d00d483c1081139330b39a531d
Created June 7, 2017 16:21
ERROR RENTATSROYO.CAT LOGFILE
181.174.184.150 - - [06/Jun/2017:20:52:15 +0200] "GET /ca/finalizar-comprar/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
181.174.184.150 - - [06/Jun/2017:20:53:24 +0200] "GET /ca/finalizar-comprar/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
181.174.184.150 - - [06/Jun/2017:20:54:25 +0200] "GET /ca/finalizar-comprar/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
181.174.184.150 - - [06/Jun/2017:20:56:05 +0200] "GET /feed/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
181.174.184.150 - - [06/Jun/2017:22:13:32 +0200] "GET /ca/?gclid=COrD6KKLqdQCFcIK0wodrv8OeQ HTTP/1.1" 500 - "-" "Mozilla/5.0 (Linux; Android 5.1; E5603 Build/30.1.A.1.55) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36"
181.174.184.150 - - [06/Jun/2017:23:50:11 +0200] "GET / HTTP/1.1" 302 - "https://www.google.es/" "Mo
C:\Users\David\AppData\Local\Programs\Python\Python36-32\python.exe C:/Users/David/PycharmProjects/provapython/prova.py
Traceback (most recent call last):
File "C:/Users/David/PycharmProjects/provapython/prova.py", line 16, in <module>
wait.until(page_is_loaded) #Do the above until function page_is_loaded gives true
File "C:\Users\David\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\support\wait.py", line 71, in until
value = method(self._driver)
File "C:/Users/David/PycharmProjects/provapython/prova.py", line 8, in page_is_loaded
return browser.find_element_by_name("bgcdw_login_form_username") != None #Return if the login form element is found on the sourcecode
File "C:\Users\David\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 381, in find_element_by_name
return self.find_element(by=By.NAME, value=name)
@davidroyo
davidroyo / main.cpp
Last active May 28, 2017 08:28
C++ Command Calculator
#include <iostream>
using namespace std;
int main()
{
int a;
int b;
int ask;
int result;
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->