Element -- selects all h2 elements on the page
h2 {
foo: bar;| <?php | |
| // original: https://github.com/stormuk/storm-twitter + stevelacey patch | |
| if(!isset($_GET['u'])) { header("HTTP/1.0 404 Not Found"); die('no username provided');} | |
| $screenName = $_GET['u']; | |
| require('StormTwitter.class.php'); | |
| require('config.php'); | |
| // configuration control | |
| if($config['key'] == '' or $config['secret'] == '' or $config['token'] == '' or $config['token_secret'] == '') { header("HTTP/1.0 404 Not Found"); die('missing API credentials in config.php'); } |
| // ==UserScript== | |
| // @name RemoveAntiAdblock | |
| // @namespace raa | |
| // @include http://www.WEBSITE.TLD/* | |
| // @version 1 | |
| // ==/UserScript== | |
| // Thanks to http://stackoverflow.com/a/8345837 | |
| // Set a fake timeout to get the highest timeout id | |
| var highestTimeoutId = setTimeout(";"); |
| javascript:{var elems = document.getElementsByTagName('pre'), i, j; | |
| for (i in elems) { | |
| if(elems[i].id.indexOf("out") == -1) { | |
| var lines = elems[i].innerHTML.split("\n"); | |
| var out = ""; | |
| for( j in lines ) { | |
| if(lines[j].length > 0 && (""+lines[j]).indexOf("[ERROR]") > 0) { | |
| lines[j] = "<span style=\"background-color:red;color:white\">" + lines[j] + "</span>"; | |
| } | |
| else if(lines[j].length > 0 && (""+lines[j]).indexOf("[WARN]") > 0) { |
| <?php | |
| stream_context_set_default(array( | |
| 'http' => array( | |
| 'method' => 'GET', | |
| 'timeout' => 10, | |
| 'header' => "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:20.0; Favicon; +https://github.com/ArthurHoaro/favicon) Gecko/20100101 Firefox/32.0\r\n", | |
| ) | |
| ) | |
| ); |
| <?php | |
| function base64url_encode($data) { | |
| return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); | |
| } | |
| function generateJwtToken($secret) { | |
| $header = base64_encode('{ | |
| "typ": "JWT", | |
| "alg": "HS512" |
| <?php | |
| /** | |
| * Shaarli template cache generator | |
| * | |
| * This script is used to generate Shaarli's RainTPL cache files for translations. | |
| * See http://shaarli.readthedocs.io/en/master/Translations/ | |
| * | |
| * Usage: | |
| * 1. Remove all PHP files in <shaarli's directory>/tmp/ |
| div.gsfHighlightResult { | |
| background-color: #05200d !important; | |
| color: #fff !important; | |
| } | |
| div.gsfHighlightResult div > span { | |
| color: #fff !important; | |
| } | |
| div.gsfHighlightResult a { |
| #!/bin/bash | |
| if [[ $# != 1 ]]; then | |
| echo "Usage: github_latest \"<repo author>/<repo name\"" | |
| exit 1 | |
| fi | |
| curl -s "https://api.github.com/repos/$1/releases/latest" | jq -r '.tag_name' |