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
| import gitlab | |
| import urllib3 | |
| import humanfriendly | |
| import timeago, datetime | |
| # 2020-04-24T12:04:26.475+00:00 | |
| date_now = datetime.datetime.now() | |
| urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
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
| blueprint: | |
| name: ZHA - Sonoff SNZB-01 | |
| description: 'Perform actions with the Sonoff SNZB-01 Button. | |
| You can set functions for single press, double press and hold. This allows you to assign, | |
| e.g., a scene or anything else.' | |
| domain: automation | |
| input: | |
| remote: |
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 | |
| if (!isset($_GET['ILoveMauticReallyIDo'])) { | |
| echo 'The secret phrase is wrong.'; | |
| die; | |
| } | |
| $link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
| $allowedTasks = array( | |
| 'cache:clear', |
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
| http://0-www.sciencedirect.com.www.consuls.org/science?_ob=QuickSearchURL&_method=submitForm&_acct=C000050221&md5=0c4b6db32507e4a332b2aa6dd47a65f4&qs_all={searchTerms}&qs_author=&qs_title=&qs_vol=&qs_issue=&qs_pages=&x=34&y=15 | |
| http://0-dictionary.oed.com.library.utulsa.edu/cgi/findword?query_type=word&queryword={searchTerms} | |
| http://100.daum.net/search/search.do?query={searchTerms} | |
| http://1000corks.com/search?st={searchTerms}&src=myc | |
| http://11870.com/konsulto/{searchTerms} | |
| http://1000memories.com/search?q={searchTerms} | |
| http://130.219.35.129/search?q={searchTerms}&btnG=Google+Search&entqr=0&output=xml_no_dtd&sort=date%3AD%3AL%3Ad1&client=default_frontend&ud=1&oe=UTF-8&ie=UTF-8&proxystylesheet=default_frontend&site=default_collection | |
| http://1337x.org/search/{searchTerms}/0/ | |
| http://11888.ote.gr/web/guest/white-pages/search?who={searchTerms}&where= | |
| http://140.111.34.46/cgi-bin/newDict/dict.sh?idx=dict.idx&cond={searchTerms}&pieceLen=50&fld=1&cat=&imgFont=1 |
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 | |
| /** | |
| * This little class records how long it takes each WordPress action or filter | |
| * to execute which gives a good indicator of what hooks are being slow. | |
| * You can then debug those hooks to see what hooked functions are causing problems. | |
| * | |
| * This class does NOT time the core WordPress code that is being run between hooks. | |
| * You could use similar code to this that doesn't have an end processor to do that. | |
| */ |
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 // only copy this line if needed | |
| /** | |
| * Renders a notice and prevents checkout if the cart | |
| * only contains products in a specific category | |
| */ | |
| function sv_wc_prevent_checkout_for_category() { | |
| // set the slug of the category for which we disallow checkout | |
| $category = 'clothing'; |
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 NEW ADMIN USER TO WORDPRESS | |
| // ---------------------------------- | |
| // Put this file in your Wordpress root directory and run it from your browser. | |
| // Delete it when you're done. | |
| // Original script by Joshua Winn - https://joshuawinn.com/create-a-new-wordpress-admin-user-from-php | |
| require_once('wp-blog-header.php'); | |
| require_once('wp-includes/registration.php'); |
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 | |
| /** | |
| * USAGE: | |
| * - Search and replace the `CUSTOM_SITEMAP` string with a lowercase identifier name: e.g., "vehicles", "customer_profiles" | |
| * - The `your_alternate_data_source()` function does not exist; it's simply a placeholder for your own function that returns some sort of data array. | |
| * - Uses heredocs for inline XML: https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc | |
| */ | |
| /** |
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 | |
| /** | |
| * USAGE: | |
| * - Configure the return value of the `CUSTOM_SITEMAP_post_types` to required post type(s) - otherwise populates sitemap with all posts and pages | |
| * - Search and replace the `CUSTOM_SITEMAP` string with a lowercase identifier name: e.g., "myseo", "vehicles", "customer_profiles", "postspage", etc. | |
| * - Uses heredocs for inline XML: https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc | |
| */ | |
| /** |
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
| //Program that outputs all PS2 scancodes via serial | |
| #define BUFFER_SIZE 45 | |
| static volatile uint8_t buffer[BUFFER_SIZE]; | |
| static volatile uint8_t head, tail; | |
| #define DATA_PIN 10 | |
| #define IRQ_PIN 3 | |
| // The ISR for the external interrupt |
NewerOlder