Skip to content

Instantly share code, notes, and snippets.


Joshua Estes JoshuaEstes

View GitHub Profile
JoshuaEstes / 00-README.markdown
Last active Aug 29, 2015
My goto files for when I initialize a new symfony2 project. It includes bash scripts, composer.json files and a few other things.
View 00-README.markdown


These are the default files that I will usually start with when setting up a symfony2 project to use vagrant and puppet. I'm putting this readme file here for future updates.


Make sure the files that end in .sh are executable.

martindale /
Last active Aug 29, 2015 Template

Getting Started


One or two paragraph introduction on the objective of this library.

Quick Start

If you are unsure of our project and just want to play around, you can get things set up quickly by:

JoshuaEstes / Vagrant.rst
Last active Aug 29, 2015
Useful Oneliners
View Vagrant.rst


# Gettting the state of the machine, ie Is it poweroff or running

vagrant status --machine-readable | awk -F',' '$3 == "state" { print $4 }'

Can be used in a script like so

View 1_Min_Micro_Trading.mq4
//| 1_Min_Micro_Trading.mq4 |
//| StarLimit Software Corps., |
//| |
#property copyright "StarLimit Software Corps.,"
#property link ""
#property indicator_chart_window
iangreenleaf / bitcoin_idle
Created Jun 2, 2011
Bitcoin mining when idle
View bitcoin_idle
# Monitors for signals from gnome-screensaver and activates or deactivates
# bitcoin miners accordingly.
# Params to the mining programs are all hardcoded. Change 'em manually. Leave the "&"s.
dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver',member='ActiveChanged'" | \
while read line; do
case "$line" in
View gist:1144989
//| LiveAlligator.mq4 |
//| Copyright © 2011, MetaQuotes Software Corp. |
//| |
// Trend Detection function
#define BULL 1
#define BEAR 2
// Input variables
lanwin /
Created Feb 2, 2012
Script to Automatically add all GitLab users to all projects
repo_access=2 #0=denied 1=read 2=read&write
project_access=2 #0=deined 1=read 2=report 3=admin
# login
curl -s -I -c cookies.txt -d "utf8=✓&user[email]=$usermail&user[password]=$userpass&commit=Sign+in" $baseurl/users/sign_in
kriswallsmith / QSAListener.php
Created Aug 8, 2012
implements QSA on Symfony2 redirects
View QSAListener.php
use JMS\DiExtraBundle\Annotation as DI;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
/** @DI\Service */
class QSAListener
private $blacklist;
jmather / LoginTest.php
Created Oct 4, 2012
Authenticate a user login
View LoginTest.php
namespace Application\Sonata\UserBundle\Tests\Functional;
use IC\Bundle\Base\TestBundle\Test\WebTestCase;
class LoginTest extends WebTestCase
* {@inheritdoc}
beberlei / CommandMethodMapper.php
Created Nov 24, 2012
Symfony Form DataMapper that uses a command method to write data back on object
View CommandMethodMapper.php
* This file is part of the Symfony package.
* (c) Fabien Potencier <>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.