Skip to content

Instantly share code, notes, and snippets.

View cweagans's full-sized avatar

Cameron Eagans cweagans

View GitHub Profile
@cweagans
cweagans / -
Created October 13, 2015 18:38
diff --git a/aws_sqs.services.yml b/aws_sqs.services.yml
index 4040cd8..8b9a833 100644
--- a/aws_sqs.services.yml
+++ b/aws_sqs.services.yml
@@ -1,3 +1,4 @@
services:
queue.awssqs:
- class: Drupal\aws_sqs\Queue\QueueAwsSqsFactory
\ No newline at end of file
+ class: Drupal\aws_sqs\Queue\AwsSqsQueueFactory
<?php
namespace My\Something {
class MyClass {
public static function my_function() {
echo "shutdown function called";
}
}
}
@cweagans
cweagans / PHPUnit_Extensions_PhptTestCase.patch
Last active January 20, 2017 00:51
Changes undesirable behavior in PHPUnit_Extensions_PhptTestCase for cweagans/mcrypt-polyfill tests.
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);
$ ./build.py --codeintel-completer
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The CXX compiler identification is AppleClang 6.1.0.6020053
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
diff --git a/README.md b/README.md
index e6a463a..d50d69e 100644
--- a/README.md
+++ b/README.md
@@ -100,3 +100,8 @@ This library draws inspiration from the [C++ Boost Graph Library](http://www.boo
## License
MIT
+
+## THIS IS A NEW SECTION ADDED BY A PATCH.
akamai-x-get-request-id, akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no
@cweagans
cweagans / Vagrantfile
Last active June 8, 2018 20:46
Vagrantfile
# 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"]
" Configure Cmd+/ to run `gc` in visual mode for block commenting
vnoremap <D-/> :Commentary<CR>
nnoremap <D-/> :Commentary<CR><Down>
" Configure Gist plugin
let g:gist_clip_command = 'pbcopy'
let g:gist_post_private = 1

Keybase proof

I hereby claim:

  • I am cweagans on github.
  • I am cweagans (https://keybase.io/cweagans) on keybase.
  • I have a public key ASAPmo6ViiFSyBRzFnaGu5YiSMZC2J7ktAyLRBXy4batRgo

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" }