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 custom config | |
| # mostly from jacmaes setup in the PW forum. | |
| location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map)$ { | |
| add_header Access-Control-Allow-Origin "*"; | |
| expires 48h; | |
| access_log off; | |
| try_files $uri $uri/ /index.php?it=$uri&$args; | |
| } | |
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 namespace ProcessWire; | |
| /** | |
| * | |
| * Import images from a CSV from WP (or wherever). | |
| * In this case CSV has image path and page alias. | |
| * | |
| */ | |
| include("index.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 | |
| /** | |
| * | |
| * Calculate reading time on page save. | |
| * Add this to your ready.php file. | |
| * Uses a field called 'article_read_time' to store the value | |
| * and the field 'page_content' as the readable content. | |
| * You'll need to update those field names if yours are different. | |
| * |
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 | |
| /** | |
| * | |
| * Read a CSV file of URLS then use curl | |
| * to check their http code and dump it all | |
| * out in a table. | |
| * | |
| */ |
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 namespace ProcessWire; | |
| /** | |
| * 201105 | |
| * | |
| * Quick script to read in a CSV of users and create | |
| * users in ProcessWire's LoginRegisterPro module. | |
| * Place this in the root of your PW install and then open /user_import.php | |
| * Yeah - sure it could be done in a shell script or in Tracy but this is | |
| * pretty simple. |
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 | |
| COMPRESS=1 # Compress if ImageOptim is intalled. 0 = disabled; 1 = enabled | |
| iOSSubdir="/ios" # make this an empty string to save in same dir | |
| androidSubdir="/android" # make this an empty string to save in same dir | |
| help() { | |
| echo "" | |
| echo "Usage: ./$(basename "$0") <your_1024x1024.png>" | |
| echo " --------------------------------------------------------------------------------------" |
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
| // tag for a soundcloud html5 player | |
| $scCode=$params['code']; | |
| echo '<iframe width="100%" height="132" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/' . $scCode . '&auto_play=false&hide_related=true&show_comments=false&show_user=true&show_reposts=false&visual=true"></iframe>'; |
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
| //lord I hate apple. | |
| //if git complains about not being able to merge binary file . DS_Store then run | |
| git rm --cached .DS_Store |
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
| adb logcat CordovaLog:D *:S |
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
| // write out an embed tag for a youtube vid. | |
| $ytCode=$params['code']; | |
| if(isset($params['height'])){ | |
| $height=$params['height']; | |
| }else{ | |
| $height=290; | |
| } | |
| if(isset($params['width'])){ |
NewerOlder