Caches the output of any other CLI tool in a simple filesystem-backed cache.
Put the file in your $PATH
somewhere. I called mine cache
instead of cache.sh
, so that's what's reflected in the examples below.
diff --git a/classes/wp-security-utility.php b/classes/wp-security-utility.php | |
index e1c53dc..4f203ef 100644 | |
--- a/classes/wp-security-utility.php | |
+++ b/classes/wp-security-utility.php | |
@@ -534,7 +534,9 @@ class AIOWPSecurity_Utility { | |
$current_unix_time = current_time('timestamp', true); | |
$previous_hour = $current_unix_time - 3600; | |
AIOWPSecurity_Utility::is_multisite_install() ? $tbl = $wpdb->sitemeta : $tbl = $wpdb->prefix . 'options'; | |
- $query = $wpdb->prepare("SELECT * FROM {$tbl} WHERE option_name LIKE 'aiowps_captcha_string_info_time_%' AND option_value < %s", $previous_hour); | |
+ AIOWPSecurity_Utility::is_multisite_install() ? $name_col = 'meta_key' : $name_col = 'option_name'; |
# Up to date version can always be found at https://gist.github.com/cweagans/4e879a72985905e145df | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "ubuntu/xenial64" | |
config.vm.synced_folder ".", "/srv", type: "nfs" | |
config.vm.network "private_network", ip: "192.168.205.142" | |
config.vm.network "forwarded_port", guest: 80, host: 8085 | |
config.vm.provider "virtualbox" do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "1024"] |
0405564c3be1133fa898dee6026cc0311bb38afa486a5cf5bf59724d2f39d63592313c35d56f4931628fb273334888de5ee907a5d6fd1be13ca966f5d57b8a307f |
<?php | |
$dispatcher = new EventDispatcher(); | |
$dispatcher->addListener('event.name', [any PHP Callable]); | |
$dispatcher->dispatch('event.name'); // the callable you specified above gets called. |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"net" | |
"os" | |
) |
I hereby claim:
To claim this, I am signing this object:
diff --git a/src/Extensions/PhptTestCase.php b/src/Extensions/PhptTestCase.php | |
index 162c6d80..cb1cfe02 100644 | |
--- a/src/Extensions/PhptTestCase.php | |
+++ b/src/Extensions/PhptTestCase.php | |
@@ -109,6 +109,10 @@ private function assertPhptExpectation(array $sections, $output) | |
$assertion = $sectionAssertion; | |
$expected = $sectionName == 'EXPECTREGEX' ? "/{$sectionContent}/" : $sectionContent; | |
+ // HACK: Get rid of filenames in expected output. | |
+ $expected = str_replace('%s%e' . basename($this->filename, 't'), '-', $expected); |
I hereby claim:
To claim this, I am signing this object:
diff --git a/Library/Formula/ctags.rb b/Library/Formula/ctags.rb | |
index 87dd0ca..919717e 100644 | |
--- a/Library/Formula/ctags.rb | |
+++ b/Library/Formula/ctags.rb | |
@@ -12,6 +12,8 @@ class Ctags < Formula | |
# fixes http://sourceforge.net/tracker/?func=detail&aid=3247256&group_id=6556&atid=106556 | |
def patches | |
+ # rewritten PHP parser | |
+ { :p1 => "http://sourceforge.net/p/ctags/patches/_discuss/thread/3a930d9f/1405/attachment/0000-PHP-parser-rewrite.patch" } |