Skip to content

Instantly share code, notes, and snippets.

View jamesstacyjones's full-sized avatar

Stacy Jones jamesstacyjones

View GitHub Profile
@jamesstacyjones
jamesstacyjones / gist:6957439
Last active December 25, 2015 09:49
toggle button with jquery and css.
<a class="togglebutton" title="Toggle Me">Toggle Me</a>
a.togglebutton {
    background: #ccc;
    cursor: pointer;
    border-top: solid 2px #eaeaea;
 border-left: solid 2px #eaeaea;
@jamesstacyjones
jamesstacyjones / gist:6953856
Last active December 25, 2015 09:29
git ~ ignore files that already exist in the repository

To ignore command:

git update-index --assume-unchanged [path/filename.ext]

To un-ignore command:

git update-index --no-assume-unchanged [path/filename.ext]
@jamesstacyjones
jamesstacyjones / gist:6663260
Last active December 23, 2015 16:39
doctrine debug dump
echo '<pre>';
\Doctrine\Common\Util\Debug::dump($nameofvariable);
echo '</pre>';
exit;
@jamesstacyjones
jamesstacyjones / gist:6645309
Last active December 23, 2015 13:59
symfony2 - create database entities based on database schema.

From terminal to run these commands. As there are 3 commands to run in order to get Symfony2 to recognize the database as entities.

Step 1: Import database into Bundle and create yaml files. [ --em=dev ] Used to recognize the database to import. In order to do this the database configuration files need to be set up with parameters.yml and config.yml

./app/console doctrine:mapping:import --em=dbname BundleName yml
@jamesstacyjones
jamesstacyjones / gist:6644981
Last active December 23, 2015 13:49
symfony - enable debug in twig by placing this into app/config/config_dev.yml
twig:
    debug: %kernel.debug%
services:
   twig.extension.text:
       class: Twig_Extensions_Extension_Text
       tags:
           - { name: twig.extension }
   twig.extension.debug:
 class: Twig_Extensions_Extension_Debug