I hereby claim:
- I am cmbirk on github.
- I am cmbirk (https://keybase.io/cmbirk) on keybase.
- I have a public key ASDxvDda42TMGq5vR47A0_1Ydq36iLJvnGojuiyFloPwcAo
To claim this, I am signing this object:
| public function sponsor() | |
| { | |
| $sponsor = $this->belongsToMany('Group')->first(); | |
| if(!$sponsor) { | |
| return $this->belongsToMany('User'); | |
| } | |
| return $this->belongsToMany('Group'); | |
| <?php | |
| /* | |
| * Translate a non-standard object into an associative array object. | |
| * Super-useful for dealing with simplexml objects. | |
| */ | |
| function simpleXML_to_object($obj) | |
| { | |
| $data = new StdClass(); | |
| if( | |
| (is_object($obj) && get_class($obj) == 'SimpleXMLElement') |
| A fairly simple and generic solution would be determining currently resolved ui-view by element hierarchy. | |
| Create a directive and assign it to your ui-view elements. Example: | |
| <div ui-view state-loader> | |
| <div ui-view state-loader></div> | |
| </div> | |
| The directive will use the $stateChangeStart events to decide whether current ui-view is the one being resolved and add relevant classes. Example: | |
| angular.module('myApp') | |
| .directive('stateLoader', function stateLoader() { | |
| return { |
| A fairly simple and generic solution would be determining currently resolved ui-view by element hierarchy. | |
| Create a directive and assign it to your ui-view elements. Example: | |
| <div ui-view state-loader> | |
| <div ui-view state-loader></div> | |
| </div> | |
| The directive will use the $stateChangeStart events to decide whether current ui-view is the one being resolved and add relevant classes. Example: | |
| angular.module('myApp') | |
| .directive('stateLoader', function stateLoader() { | |
| return { |
I hereby claim:
To claim this, I am signing this object:
| //Thanks to http://laravel-tricks.com/tricks/display-all-sql-executed-in-eloquent | |
| //Put this in your routes.php file | |
| // Display all SQL executed in Eloquent | |
| Event::listen('illuminate.query', function($query) | |
| { | |
| var_dump($query); | |
| }); |
| body { | |
| color:blue; | |
| } |
| #!/bin/bash | |
| ## | |
| # Based on the blog post at http://www.aymerick.com/2014/07/22/jekyll-github-pages-bower-bootstrap.html | |
| ## | |
| echo "Please enter the github repository url ( [email protected]:<user>/<repo>.git ): " | |
| read GIT_REPO | |
| BASENAME=$(basename $GIT_REPO) |
| import {SecretManagerServiceClient} from '@google-cloud/secret-manager' | |
| const projectId = 'project-id' | |
| // Instantiates a client | |
| const client = new SecretManagerServiceClient(); | |
| export const accessSecretVersion = async (secretName) => { | |
| const [version] = await client.accessSecretVersion({ |