Skip to content

Instantly share code, notes, and snippets.

Blade::extend(function ($view) {
return preg_replace(
'/{{(\'|")(.*)(\'|")}}/',
'<?php echo e(trans($1$2$1)); ?>',
$view
);
});
// And you should be able to do tho this on your Blade templates
---
- name: create some vms
hosts: localhost
connection: local
vars_prompt:
- name: "vcenter_host"
prompt: "Enter vcenter host"
private: no
default: "vcsa"
- name: "vcenter_user"
@ericelliott
ericelliott / essential-javascript-links.md
Last active October 4, 2024 20:52
Essential JavaScript Links
@gido
gido / macosx-install-php-oracle-oci8.md
Last active September 30, 2024 01:51
install Oracle PHP Extension (oracle OCI8) - instantclient for Mac OS 10.8 - homebrew environnement

Installation

This procedure is tested on Mac OS X 10.8 with Developpers tools installed (xCode).

PHP 5.4 installed with Homebrew.

Update: I wrote a blog post about this.

Preparation

Download the following files from Oracle website (yes, you need to create an account and accept terms):

@jdp
jdp / example.php
Created March 26, 2012 00:44
Partial function application with PHP
<?php
function foo($a, $b) {
echo "a: {$a} b: {$b}\n";
}
$foo_caller = new PartialCallable('foo', array('A'));
$foo_caller('B');
$foo_caller = partial_function('foo', 'A');
$foo_caller('B');