Documento consolidado de endpoints RTSP conhecidos para câmeras IP, DVRs e NVRs.
Importante: endpoints RTSP podem variar conforme modelo, linha, OEM, firmware e região. Não assuma que um endereço funciona para todos os equipamentos de uma mesma marca.
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 | |
| /* | |
| |--------------------------------------------------------------------- | |
| | Rename Files | |
| |--------------------------------------------------------------------- | |
| | | |
| | This is a simple script to renames files in the current directory. | |
| | It converts filenames to lowercase, removes non-alphanumeric | |
| | characters and converts spaces to dashes. |
All these Gist files are explained on my Open API Specification (fka Swagger Specification) tutorial on API Handyman blog.
This tutorial is composed of several posts, here are the posts links and files used for each one:
- Part 1: Introduction
- Part 2: The basics
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
| // Usage: | |
| // get_id_by_slug('any-page-slug','any-post-type'); | |
| function get_id_by_slug($page_slug, $slug_page_type = 'page') { | |
| $find_page = get_page_by_path($page_slug, OBJECT, $slug_page_type); | |
| if ($find_page) { | |
| return $find_page->ID; | |
| } else { | |
| return null; | |
| } |
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_action('admin_init', function () { | |
| // Redirect any user trying to access comments page | |
| global $pagenow; | |
| if ($pagenow === 'edit-comments.php') { | |
| wp_redirect(admin_url()); | |
| exit; | |
| } |
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
| // Usage: | |
| // get_id_by_slug('any-page-slug'); | |
| function get_id_by_slug($page_slug) { | |
| $page = get_page_by_path($page_slug); | |
| if ($page) { | |
| return $page->ID; | |
| } else { | |
| return null; | |
| } |
#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3
Kotlin project website is at kotlin.jetbrains.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.
This is a quick guide to Kotlin programming language. The previous part of this guide is here
#Object Oriented
fun main(args : Array<String>) {
class local (val x : Int)
val y = local(10)
println("${y.x}")
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
| # QTRANSLATE CLEANUP QUERIES | |
| # create temp column to separate post content on <!--more--> tag to simplify queries | |
| ALTER TABLE `wp_posts` ADD `tmp_excerpt` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; | |
| # split content | |
| ## fill `tmp_exceprt` column | |
| UPDATE wp_posts SET tmp_excerpt = |
NewerOlder