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
| # /etc/systemd/system/librenms-alerts.service | |
| [Unit] | |
| Description=Run librenms poller | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/opt/librenms/alerts.php | |
| User=librenms |
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
| DELETE | |
| FROM wp_postmeta | |
| WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'shop_order' AND YEAR(post_date) != YEAR(NOW())); | |
| DELETE | |
| FROM wp_commentmeta | |
| WHERE comment_id IN (SELECT comment_ID | |
| FROM wp_comments | |
| WHERE comment_post_id IN | |
| (SELECT ID FROM wp_posts WHERE post_type = 'shop_order' AND YEAR(post_date) != YEAR(NOW())) |
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
| awesome-client 'awful=require("awful");awful.spawn(terminal, {tag = mouse.screen.selected_tag})' |
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/bash | |
| ffmpeg -rtsp_transport tcp \ | |
| -i rtsp://smartiptv:[email protected]/Streaming/Channels/102 \ | |
| -i rtsp://smartiptv:[email protected]/Streaming/Channels/202 \ | |
| -i rtsp://smartiptv:[email protected]/Streaming/Channels/302 \ | |
| -i rtsp://smartiptv:[email protected]/Streaming/Channels/402 \ | |
| -i rtsp://smartiptv:[email protected]/Streaming/Channels/502 \ | |
| -i rtsp://smartiptv:[email protected]/Streaming/Channels/602 \ | |
| -filter_complex " |
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
| function DivYieldTtm(ticker) { | |
| var ticker = ticker || "GOOG"; | |
| ticker = encodeURI(ticker); | |
| var response = UrlFetchApp.fetch("https://fmpcloud.io/api/v3/ratios-ttm/" + ticker + "?apikey=YOUR_API_KEY"); | |
| var result = JSON.parse(response.getContentText()); | |
| return parseFloat(result[0].dividendYielTTM); | |
| } |
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
| function YahooFinance(ticker) { | |
| var ticker = ticker || "GOOG"; | |
| ticker = encodeURI(ticker); | |
| var response = UrlFetchApp.fetch("https://query2.finance.yahoo.com/v7/finance/options/" + ticker); | |
| var chain = JSON.parse(response.getContentText()); | |
| return parseFloat(chain.optionChain.result[0].quote.regularMarketPrice); | |
| } |
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
| $ cat /etc/profile.d/ssh-login-notify.sh | |
| if [ -n "$SSH_CLIENT" ]; then | |
| TEXT="$(date): ssh login to ${USER}@$(hostnamectl --static)" | |
| TEXT="$TEXT from $(echo $SSH_CLIENT|awk '{print $1}')" | |
| echo $TEXT|mail -s "ssh login" [email protected] | |
| fi |
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
| function pn_woocommerce_product_query( WP_Query $wp_query ) { | |
| if ( $wp_query->get( 'orderby' ) == 'menu_order title' ) { | |
| $wp_query->set( 'meta_query', [ | |
| 'relation' => 'AND', | |
| 'internal_stock' => [ | |
| 'key' => '_manage_stock', | |
| 'compare' => 'EXIST', | |
| ], | |
| 'stock_status' => [ | |
| 'key' => '_stock_status', |
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
| BEGIN:VCALENDAR | |
| VERSION:2.0 | |
| BEGIN:VEVENT | |
| RRULE:FREQ=YEARLY;BYMONTH=5;BYDAY=1SU | |
| SUMMARY:Mother day in Hungary | |
| DTSTART;VALUE=DATE:20190101 | |
| SEQUENCE:0 | |
| DESCRIPTION: | |
| END:VEVENT | |
| END:VCALENDAR |
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
| version: "3.2" | |
| services: | |
| wordpress: | |
| image: wordpress | |
| volumes: | |
| - type: volume | |
| source: www-data | |
| target: /var/www/html | |
| expose: | |
| - 80 |