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
| #!/usr/bin/env python3 | |
| """ | |
| Complete playlist regeneration and upload to Plex. | |
| Creates chronological playlists from music directories and uploads them to Plex, | |
| cleaning up old uploaded playlists first. | |
| Usage: | |
| python regenerate_all_playlists.py | |
| Edit the MUSIC_FOLDERS list below to specify which directories to process. |
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
| %title%$if($not($eql(%ARTIST%,Preservation Hall Jazz Band)), (feat. $replace(%ARTIST%,Preservation Hall Jazz Band & ,)),) |
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 os | |
| from microdot import Microdot | |
| import network | |
| from time import sleep | |
| from machine import Pin, I2C, reset | |
| import json | |
| from picozero import pico_led | |
| import gc | |
| import ahtx0 |
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 os | |
| from microdot import Microdot | |
| import network | |
| from time import sleep | |
| from machine import Pin, I2C | |
| import json | |
| from picozero import pico_led | |
| import ahtx0 |
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 doCommit() { | |
| local branch=$(git symbolic-ref HEAD 2> /dev/null | awk 'BEGIN{FS="/"} {print $NF}') | |
| local ticket="" | |
| if [[ $branch != "" ]]; | |
| then | |
| local parts=(${(@s[-])branch}) | |
| local part1=$parts[1] | |
| local part2=$parts[2] | |
| ticket="$part1-$part2" | |
| 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
| var dang = new SpeechSynthesisUtterance(window.location.hostname + ' is garbage and we truly apologize.'); dang.lang = 'en-US'; window.speechSynthesis.speak(dang); |
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 // TODO: put this in your functions.php file and use on a page like [pdf]/path-to-your/file.pdf[/pdf] ?> | |
| <?php | |
| function pdf_embed_shortcode($attrs, $content) { | |
| $pdfPath = $content; | |
| if ( wp_is_mobile() ) { | |
| $htmlStuff = | |
| '<div style="text-align:center;"><p id="mobilefallback">This browser does not support native PDF embeds or you are on a mobile device. Please <a href="' . $pdfPath . '" target="_blank">download</a> the PDF instead.</p> | |
| <p class="pdfDownload"><a class="btn btn-primary btn-md" href="' . $pdfPath . '" target="_blank">Download</a></p></div>'; |
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
| $maincssupdate = filemtime($path . 'wp-content/themes/your_theme/static/gen/main.css'); | |
| wp_enqueue_style( 'your_theme_custom', get_template_directory_uri() . '/static/gen/main.css', array(), $maincssupdate, 'all'); |
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 this to your functions.php | |
| replace 'mytax' with your custom taxonomy | |
| replace 'mypost' with your custom post type | |
| */ | |
| /* 1. add mytax to mypost */ | |
| function set_custom_columns($columns) { | |
| $columns['mytax'] = __( 'My Tax Name', 'your_text_domain' ); |
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
| body:after { | |
| position:fixed; | |
| top:0; | |
| bottom:0; | |
| right:0; | |
| left:0; | |
| padding-top:20%; | |
| text-align:center; | |
| background:rgba(0,0,0,0.8); | |
| content: 'it worked!'; |
NewerOlder