Skip to content

Instantly share code, notes, and snippets.

View adamelso's full-sized avatar
🚘

Adam Elsodaney adamelso

🚘
View GitHub Profile
from math import cos, sin, pi
import c4d
from c4d import gui
VENUS_YEAR_DURATION = 224.7
EARTH_YEAR_DURATION = 365.25
VENUS_ORBIT_RADIUS = 108.2
EARTH_ORBIT_RADIUS = 149.6
@adamelso
adamelso / CheckoutWithPaypalContext.php
Created May 18, 2016 10:06
PayPal Express Checkout - Behat Mink UI test with Selenium 2 Driver
<?php
class CheckoutWithPaypalContext extends MinkContext
{
/**
* @When /^I choose to pay with PayPal$/
*/
public function iChooseToPayWithPayPal()
{
$this->findAndWaitForElementToBeVisibleThenClick("//a[@id = 'paypal']");
@adamelso
adamelso / composer_create_project_sylius.out
Last active April 5, 2016 09:51
Sylius version 0.17 dependencies.
$ composer create-project sylius/sylius shop-one
Installing sylius/sylius (v0.17.0)
- Installing sylius/sylius (v0.17.0)
Downloading: 100%
Created project in shop-one
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
- Installing twig/twig (v1.23.1)
Downloading: 100%
@adamelso
adamelso / _example.sh
Last active November 3, 2020 13:28
Delete inactive branches from Platform.sh - Edit to your own needs
./plaform-inactive.sh delete
@adamelso
adamelso / platform-sh-inactive-branch-removal.js
Created March 10, 2016 12:15
Remove inactive branch environments from Platform.sh
var deleteBranches = function () {
return $("ul[ng-show='environment.active_trail']")
.first()
.find("li.disabled > div > a")
.map(function (i, b) {
return b.text;
});
};
var filterDeleteBranchesByPrefix = function (prefix) {
<?php
namespace ArchFizz\WhateverBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Helper\DebugFormatterHelper;
use Symfony\Component\Console\Helper\ProcessHelper;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
@adamelso
adamelso / deploy.rb
Last active August 29, 2015 14:08 — forked from jmather/deploy.rb
after "deploy", "deploy:cleanup"
after "deploy:update_code", "composer:install"
before "composer:install", "composer:copy_vendors"
after "composer:install", "phpunit:run_tests"
namespace :composer do
desc "Copy vendors from previous release"
task :copy_vendors, :except => { :no_release => true } do
run "if [ -d #{previous_release}/vendor ]; then cp -a #{previous_release}/vendor #{latest_release}/vendor; fi"
end
@adamelso
adamelso / SassMeister-input.scss
Created August 14, 2014 09:07
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.1)
// ----
$feelunique-color-teal: #b3cac4;
$feelunique-color-cool-teal: #b3c9c6;
$feelunique-color-turquoise: #1abc9c;
$feelunique-color-blush-red: #d72245;
$feelunique-color-off-white: #f5f1f0;
@adamelso
adamelso / GreekTranslatorSpec.php
Last active August 29, 2015 14:02
Creating a fake Translator with Spec Behaviour Driven Development using PhpSpec
<?php
namespace spec\FakeTranslator;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class GreekTranslatorSpec extends ObjectBehavior
{
function it_is_a_translator()
<?php
namespace ArchFizz\Gpx;
use Doctrine\Common\Collections\ArrayCollection;
class Coordinate
{
private $latitude;
private $longitude;