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
{ | |
"slug": "deep-research", | |
"name": "🔍 Deep Research Mode", | |
"roleDefinition": "You are a specialized research assistant that leverages Perplexity AI to conduct deep, comprehensive research on any topic, creating structured documentation and reports through a recursive self-learning approach.", | |
"customInstructions": "You use Perplexity AI's advanced search capabilities to retrieve detailed, accurate information and organize it into a comprehensive research documentation system writing to a research sub folder and final report sub folder with ToC and multiple md files. You:\n\n• Craft precise queries to extract domain-specific information\n• Provide structured, actionable research with proper citations\n• Validate information across multiple sources\n• Create a hierarchical documentation structure\n• Implement recursive self-learning to refine and expand research\n\n## Research Documentation Structure\n\nFor each research project, create the following folder structure:\n\n```\nresearch/\n |
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
$token = $this->get('security.context')->getToken(); | |
// do things that change user's roles | |
$token->setAuthenticated(false); | |
/* OR */ | |
// Add new role | |
$user->addRole('ROLE_NEW'); | |
// persist the user and it's new role to database |
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
<?php | |
// Just change the "equals" method of your User class like the following to enable automatic roles refresh instead of having to logout / login for roles change to take effect | |
class User implements UserInterface | |
{ | |
// ... | |
/** | |
* Compares this user to another to determine if they are the same. |
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
constraints: | |
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity: { fields: username, groups: [create_user, default], message: userExists } | |
- FOS\UserBundle\Validator\Unique: { property: usernameCanonical, groups: [create_user, default], message: userExists } | |
- Callback: | |
methods: [isTimeZoneValid] | |
groups: [create_user, default] |
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
// Prelod a single image | |
var image = $('<img />').attr('src', '/path/to/image.png'); | |
// Multiple images | |
function preload(arrayOfImages) { | |
$(arrayOfImages).each(function(){ | |
$('<img/>')[0].src = this; | |
// Alternatively you could use: | |
// (new Image()).src = this; | |
}); |
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
<?php | |
// Retrieve full query string into an array directly from template | |
$params = $sf_request->getParameterHolder()->getAll()->getRawValue(); |
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
// Git 1.8 | |
git branch -u remote/foo | |
// If not in branch foo | |
git branch -u remote/foo foo | |
// Git 1.7 | |
git branch --set-upstream foo remote/foo |
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
// app/config/config.yml | |
imports: | |
- { resource: parameters.yml } | |
- { resource: security.yml } | |
# various imports | |
- { resource: acmehello.yml } | |
// app/config/acmehello.yml | |
acme_hello: | |
param: |
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
<?php | |
# src/Acme/HelloBundle/Twig/AcmeExtension.php | |
namespace Acme\HelloBundle\Twig; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Component\Locale\Locale; | |
class AcmeExtension extends \Twig_Extension | |
{ |
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
.highlight .hll { background-color: #49483e } | |
.highlight { background: #272822; color: #f8f8f2 } | |
.highlight pre { background: transparent; color: #f8f8f2 } | |
.highlight .c { color: #75715e } /* Comment */ | |
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */ | |
.highlight .k { color: #66d9ef } /* Keyword */ | |
.highlight .l { color: #ae81ff } /* Literal */ | |
.highlight .n { color: #f8f8f2 } /* Name */ | |
.highlight .o { color: #f92672 } /* Operator */ | |
.highlight .p { color: #f8f8f2 } /* Punctuation */ |
NewerOlder