Skip to content

Instantly share code, notes, and snippets.

👨‍💻

Joshua Estes JoshuaEstes

👨‍💻
Block or report user

Report or block JoshuaEstes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JoshuaEstes
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

README

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.

Usage

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

@martindale
martindale / README.md
Last active Aug 29, 2015
README.md Template
View README.md

Getting Started

Overview

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
JoshuaEstes / Vagrant.rst
Last active Aug 29, 2015
Useful Oneliners
View Vagrant.rst

Vagrant

# 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., |
//| starlimit04@yahoo.com |
//+------------------------------------------------------------------+
#property copyright "StarLimit Software Corps.,"
#property link "starlimit04@yahoo.com"
#property indicator_chart_window
@iangreenleaf
iangreenleaf / bitcoin_idle
Created Jun 2, 2011
Bitcoin mining when idle
View bitcoin_idle
#!/bin/bash
# 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. |
//| http://www.mql4.com/ru/users/rustein |
//-------------------------------------------------------------------+
// Trend Detection function
#define BULL 1
#define BEAR 2
// Input variables
@lanwin
lanwin / add_users_to_projects.sh
Created Feb 2, 2012
Script to Automatically add all GitLab users to all projects
View add_users_to_projects.sh
#!/bin/sh
baseurl=http://mygitlaburl
usermail=adminuser@mymailserver
userpass=adminpassword
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
kriswallsmith / QSAListener.php
Created Aug 8, 2012
implements QSA on Symfony2 redirects
View QSAListener.php
<?php
use JMS\DiExtraBundle\Annotation as DI;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
/** @DI\Service */
class QSAListener
{
private $blacklist;
@jmather
jmather / LoginTest.php
Created Oct 4, 2012
Authenticate a user login
View LoginTest.php
<?php
namespace Application\Sonata\UserBundle\Tests\Functional;
use IC\Bundle\Base\TestBundle\Test\WebTestCase;
class LoginTest extends WebTestCase
{
/**
* {@inheritdoc}
@beberlei
beberlei / CommandMethodMapper.php
Created Nov 24, 2012
Symfony Form DataMapper that uses a command method to write data back on object
View CommandMethodMapper.php
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
You can’t perform that action at this time.