- How To Develop Your First Web Crawler Using Python Scrapy
- Scrapy tutorial
- Downloading Files from URLs in Python
- How to Download Files in Python - article on tutsplus.
- Use Scrapy to Extract Data From HTML Tags
- How to Scrape the Web using Python with ScraPy Spiders
- Beautiful soup documentation
- Современная Веб-Автоматизация при Помощи Python и Selenium
- [Selenium
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
-- Get Max ID from table | |
SELECT MAX(id) FROM table; | |
-- Get Next ID from table | |
SELECT nextval('table_id_seq'); | |
-- Set Next ID Value to MAX ID | |
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |
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
"""" | |
:link: https://github.com/PyMySQL/PyMySQL | |
""""" | |
import pymysql | |
import pymysql.cursors | |
connection = pymysql.connect(host="localhost", | |
user="root", | |
password="1234", |
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
/* | |
* Translit file names to simple chars, | |
* this prevent accents and special chars at file names. | |
***********************************************************************/ | |
function my_sanitize_file_name($filename) { | |
return remove_accents($filename); | |
} | |
add_filter('sanitize_file_name', 'my_sanitize_file_name'); | |
/* |
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 | |
/** | |
* Comment form hidden fields | |
*/ | |
function comment_form_hidden_fields() | |
{ | |
comment_id_fields(); | |
if ( current_user_can( 'unfiltered_html' ) ) | |
{ |
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 | |
/** | |
* An example of a project-specific implementation. | |
* | |
* After registering this autoload function with SPL, the following line | |
* would cause the function to attempt to load the \Foo\Bar\Baz\Qux class | |
* from /path/to/project/src/Baz/Qux.php: | |
* | |
* | |
* new \Foo\Bar\Baz\Qux; |
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 //Add all of this tu custom page template ?> | |
<?php | |
global $wpdb; | |
$error = ''; | |
$success = ''; | |
// check if we're in reset form | |
if( isset( $_POST['action'] ) && 'reset' == $_POST['action'] ) | |
{ |
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
add_action( 'wp_enqueue_scripts', 'pt_like_it_scripts' ); | |
function pt_like_it_scripts() { | |
if( is_single() ) { | |
wp_enqueue_style( 'like-it', trailingslashit( plugin_dir_url( __FILE__ ) ).'css/like-it.css' ); | |
if (!wp_script_is( 'jquery', 'enqueued' )) { | |
wp_enqueue_script( 'jquery' );// Comment this line if you theme has already loaded jQuery | |
} | |
wp_enqueue_script( 'like-it', trailingslashit( plugin_dir_url( __FILE__ ) ).'js/like-it.js', array('jquery'), '1.0', true ); |
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
## Example config for xdebug ini. Use with phpstorm ide. | |
zend_extension=xdebug.so | |
xdebug.remote_enable = on | |
xdebug.remote_connect_back = on | |
xdebug.remote_host="localhost" | |
xdebug.remote_port=9010 | |
xdebug.idekey="PHPSTORM" | |
xdebug.remote_handler=dbgp | |
xdebug.remote_autostart=1 |
NewerOlder