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
| /* | |
| * Sometimes the default password doesn't work, this is because people have moved the UB-04 card from one printer to another. | |
| * when this happens, the printer retains the serial number from the old printer or sometimes the motherboard is replaced in | |
| * the TM-L90. Either way the password wont work and you are not going to be able to config the network. | |
| * This script starts at X2NJ00 0001 and works upto 9999. You might be able to start at 1000? but this should give you the serial | |
| * number the printer wants as the default password. | |
| * Hopefully this saves someones sanity. | |
| */ | |
| <?php | |
| $login = 'epson'; |
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 | |
| // Met office significant weather codes | |
| // https://datahub.metoffice.gov.uk/definition-of-codes | |
| // Convert Met Office weather codes | |
| $weather = [ | |
| "NA" => "Not available", | |
| 4 => "Not used", | |
| -1 => "Trace rain", | |
| 0 => "Clear night", |
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
| calculate_normalised_score <- function(passmark, score) { | |
| normalised_score <- 50 | |
| if (score > passmark) { | |
| normalised_score <- 50 + 50 * ( | |
| (score - passmark) / (100 - passmark) | |
| ) | |
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(prototype) { | |
| prototype.getContext = (function(_parent) { | |
| return function(contextType, contextAttributes) { | |
| var context = _parent.call(this, contextType, contextAttributes) | |
| if (contextType != '2d') { | |
| return context | |
| } | |
| if (this.hasAttribute('data-scaled')) { | |
| return context |
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 | |
| for f in *@1x.png; do | |
| echo "$f" | |
| echo "${f%@1x.*}.png" | |
| mv "$f" "${f%@1x.*}.png" | |
| done |
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
| using terms from application "Spotify" | |
| if player state of application "Spotify" is paused then | |
| tell application "Spotify" to play | |
| else | |
| tell application "Spotify" to pause | |
| end if | |
| end using terms from |