Skip to content

Instantly share code, notes, and snippets.

View elnur's full-sized avatar
🤓

Elnur Abdurrakhimov elnur

🤓
  • Earth
View GitHub Profile
@remy
remy / details.js
Created April 18, 2010 22:28
Add <details> support - includes stylesheet
/**
* Note that this script is intended to be included at the *end* of the document, before </body>
*/
(function (window, document) {
if ('open' in document.createElement('details')) return;
// made global by myself to be reused elsewhere
var addEvent = (function () {
if (document.addEventListener) {
return function (el, type, fn) {
Feature: Updating an existing request
In order to change my mind about what I need
I want to be able to edit my Request
Background:
Given I am logged in with facebook
And I go to the new request page
And I fill in the following:
| I want | Dragon's Lair Arcade Game |
| for | 2000 |
@aslakhellesoy
aslakhellesoy / edit_request.feature
Created October 5, 2011 17:49 — forked from patrick99e99/edit_request.feature
Refactored from imperative to declarative
Feature: Updating an existing request
In order to change my mind about what I need
I want to be able to edit my Request
Background: Logged in via facebook with one request
Given I am logged in with facebook
And I have a request for "Dragon's Lair Arcade Game" at $2000
Scenario: Logged in users can edit requests
When I change the request to "iPhone6" at $300
Hi David,
I came across your profile online and wanted to reach out about Development
Opportunities here at Groupon. The company is growing, and we're always
looking for folks with solid skills that can make positive contribution to
our continued success. Any chance you'd be open to a quick conversation
about opportunities, or for any possible networking potential? If so, let me
know when you're free and we can set up a time to chat. Also, if you are
interested, it would be great if you could forward a current resume over
that I can take a look at. I look forward to hearing back from you! Please
let me know if you have any questions.
@merk
merk / GroupManager.php
Created March 22, 2012 02:37
ObjectManager/Manager service trait test. Allows multiple object Manager classes to use Doctrine's ObjectManager, rather than reimplementing the same functions again and again.
<?php
namespace Ibms\CustomerBundle\Entity;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ORM\QueryBuilder;
/**
* Manages Group objects.
*
<?php
public function contactAction()
{
/** @var \Infinite\ContactBundle\Form\Handler\ContactFormHandler $formHandler */
$formHandler = $this->get('infinite_contact.contact.form.handler');
if ($formHandler->process()) {
return $this->redirect($this->generateUrl('InfiniteContactBundle_contact_sent'));
}
@guillaumebort
guillaumebort / 1.sql
Created May 25, 2012 15:17
Play 2.0/Anorm
# --- !Ups
CREATE TABLE users(
email VARCHAR(255) NOT NULL PRIMARY KEY,
name VARCHAR(255)
);
CREATE TABLE subjects(
id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
title LONGTEXT NOT NULL,
@merk
merk / Customer.php
Created July 12, 2012 12:08
Symfony 2.1 collections with by_reference = false
<?php
namespace Ibms\CustomerBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\MappedSuperclass
@Ocramius
Ocramius / User.php
Last active July 24, 2024 14:38
Doctrine 2 ManyToMany - the correct way
<?php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity()
* @ORM\Table(name="user")
*/
class User
@maxim
maxim / task.yml
Created June 12, 2014 11:09
Adding github to known_hosts with ansible
- name: ensure github.com is a known host
lineinfile:
dest: /root/.ssh/known_hosts
create: yes
state: present
line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}"
regexp: "^github\\.com"