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
| #!/bin/sh | |
| # check for root access | |
| SUDO= | |
| if [ "$(id -u)" -ne 0 ]; then | |
| SUDO=$(command -v sudo 2> /dev/null) | |
| if [ ! -x "$SUDO" ]; then | |
| echo "Error: Run this script as root" | |
| exit 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
| /** | |
| * Recursively searches the startObject for the given value. | |
| * | |
| * All matches are displayed in the browser console and stored in the global variable "gsResults" | |
| * The function tries to simplify DOM element names by using their ID, when possible. | |
| * | |
| * Usage samples: | |
| * | |
| * globalSearch( document, 'someValue' ); // Search entire DOM document for the string value. | |
| * globalSearch( document, '^start' ); // Simple regex search (function recognizes prefix/suffix patterns: "^..." or "...$"). |
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 | |
| class TargheApi | |
| { | |
| private $token; | |
| const ENDPOINT = "https://informazioni-targhe.p.rapidapi.com"; | |
| public function __construct($token) | |
| { | |
| $this->token = $token; | |
| } | |
| public function submit($targhe, $op) |
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'); |
NewerOlder