Skip to content

Instantly share code, notes, and snippets.

View intellix's full-sized avatar

D intellix

View GitHub Profile
@intellix
intellix / SassMeister-input.scss
Created September 16, 2015 07:52
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
.foot-ribbon, .foot-content {
padding: 15px 30px;
.seperator {
&:before {
content: " ";
@intellix
intellix / SassMeister-input.scss
Created October 31, 2015 09:29
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$max-notifications: 10;
&:nth-child(n+#{$max-notifications + 1}) {
margin-top: -#{120px * ($max-notifications + 2)};
z-index: 100 - #{$max-notifications + 1};
left: -210px;
@intellix
intellix / SassMeister-input.scss
Created November 9, 2015 10:27
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@mixin zig-zag($color) {
background-image:
linear-gradient(135deg, $color 0%, $color 50%, rgba($color, 0) 50%, rgba($color, 0) 100%),
linear-gradient(-135deg, $color 0%, $color 50%, rgba($color, 0) 50%, rgba($color, 0) 100%),
linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, transparent 100%);
}
@intellix
intellix / SassMeister-input.scss
Created November 16, 2015 14:53
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// Import
$red: #cc0000;
// Defaults
@intellix
intellix / SassMeister-input.scss
Last active November 25, 2015 13:47
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@import "bourbon/bourbon";
$bars: (
#3366CC #45afe2,
#DC3912 #FF3300,
);
@intellix
intellix / Module.php
Created July 22, 2013 10:38
ServiceManager into Service models
public function getServiceConfig()
{
return array(
'factories' => array(
'Application\Service\PlayerService' => function ($sm) {
$model = new Service\PlayerService($sm);
return $model;
}
)
);
@intellix
intellix / ManyObjectsExist.php
Created July 27, 2013 15:01
User wants to send mail to many other users in the game. This validator checks that they all exist within a Doctrine Repository.. based on ObjectExists for Doctrine ZF2 module.
<?php
namespace Application\Validator;
use Zend\Validator\AbstractValidator;
use Zend\Validator\Exception;
use Doctrine\Common\Persistence\ObjectRepository;
use Zend\Stdlib\ArrayUtils;
/**
@intellix
intellix / gist:6098619
Created July 28, 2013 13:40
Multi Dimensional array_unique
/**
* Removes duplicate entries in a multi-dimensional array
* @param array $a the array you want to process
* @param string $i the index you would like to run against
* @return array the processed array
*/
public function md_array_unique($a, $i) {
$unset = array();
for($x = 0; $x < sizeof($a); $x++){
for($y = 1; $y < (sizeof($a) - $x); $y++){
@intellix
intellix / Application\Service\UserService.php
Created July 28, 2013 22:42
Bcrypt passwords with ZF2 + Doctrine ORM Module
<?php
namespace Application\Service;
use Zend\Crypt\Password\Bcrypt;
use Application\Entity;
class UserService
{
@intellix
intellix / YourForm.php
Last active December 20, 2015 12:19
Simple ZF2 validation using inputProviderInterface
<?php
namespace Application\Form;
use Zend\Form\Form;
use Zend\Validator;
use Zend\InputFilter\InputFilterProviderInterface;
class YourForm extends Form implements InputFilterProviderInterface
{