This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function _initConfig(){ | |
$config = $this->getApplication()->getOption('app'); | |
Zend_Registry::set('config.app', $config['config']); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var e = document.getElementById('pagelet_groups_requests'); var els = e.getElementsByTagName('input'); for(var i = 0; i < els.length; i++){ if(els[i].getAttribute('value') == 'Ignore'){ els[i].click(); } }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var e = document.getElementById('pagelet_requests'); var els = e.getElementsByTagName('input'); for(var i = 0; i < els.length; i++){ if(els[i].getAttribute('name') == 'actions[reject]'){ els[i].click(); } }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
1. Download and add drush to your template folder or put it somewhere on your computer and symlink it - http://drupal.org/project/drush | |
2. Add the following task to your Ant build file after your deployment tasks | |
3. 'dir' is the path to your local deployment i.e. /Users/yourname/Sites/yourwebsite/public_html | |
4. 'executable' is the path to your drush command. Simply use drush in this attribute if you have symlinked it | |
--> | |
<exec dir="${path.deploy}" executable="${directory.build.tools}/drush/drush" failonerror="true" output="/dev/null"> | |
<arg line="cache-clear all" /> | |
</exec> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<routes xmlns="http://friendsofsymfony.github.com/schema/rest" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://friendsofsymfony.github.com/schema/rest http://friendsofsymfony.github.com/schema/rest/routing-1.0.xsd"> | |
<import id="your_id" type="rest" resource="\Namespace\For\Your\Resource" /> | |
</routes> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* By checking to see whether an assignment is an instance of an object, Zend Studio will pick up on this hint | |
* and produce code complete for your newly assigned variable. | |
*/ | |
if(($entity instanceof \My\Special\Object\Entity\EntityName) === false){ | |
throw new Exception('WAAAAH! Something went wrong!'); | |
} else { | |
$entity->getAwesomeness(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
($object instanceof \Fishrod\CardBundle\Entity\Artwork); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
angular.module('MyApp') | |
.service('Shortcuts', function Shortcuts() { | |
var _subscribers = {}, | |
_keystrokes = []; | |
var processKeyStrokes = function processKeyStrokes(keystrokes) { | |
// Rebuild the hash, this is probably the quickest way to find our subscribers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
read "?Lastpass Folder (i.e. AWS/ include the trailing slash) " folder; for filename in ~/.ssh/*.pem; do printf "Private Key: $(cat $filename)" | lpass add $folder/$(basename $filename) --note-type=ssh-key --non-interactive; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste into console where the Amazon Fresh basket is visible, hit enter | |
document.querySelectorAll("[data-action='fresh-item-delete'] a").forEach(e => e.click()); |