Skip to content

Instantly share code, notes, and snippets.

View PoisonousJohn's full-sized avatar

Ivan Fateev PoisonousJohn

View GitHub Profile
Ther is a class
class Boo : public SuperBoo {
Foo* fFoo1;
Foo* fFoo2;
// ...
}
where foo is a monomorphic class, and Boo owns pointers fFoo1 and fFoo2
task: overload operator= for Boo
that's all >_<
@PoisonousJohn
PoisonousJohn / CCSpriteHue.h
Last active December 11, 2015 06:59
Hue shader
//
// Created by JohnPoison <[email protected]> on 1/17/13.
#import <Foundation/Foundation.h>
#import "CCSprite.h"
@interface CCSpriteHue : CCSprite {
@PoisonousJohn
PoisonousJohn / gist:4339608
Created December 19, 2012 19:16
If I pass Vertex structure to shader attribute then it works, but if I'm passing one dimensional array, then it doesn't work
typedef struct {
float Position[3];
float Color[4];
} Vertex;
const Vertex Vertices[] = {
{{1, -1, -7}, {1, 0, 0, 1}},
{{1, 1, -7}, {0, 1, 0, 1}},
{{-1, 1, -7}, {0, 0, 1, 1}},
{{-1, -1, -7}, {0, 0, 0, 1}}
varying lowp vec4 DestinationColor; // 1
void main(void) { // 2
gl_FragColor = DestinationColor; // 3
}
/**
* source : http://snipplr.com/view/22741/slugify-a-string-in-php/
*
* @static
* @param $text
* @return mixed|string
*/
static public function slugify($text)
{
// replace non letter or digits by -
<?php
namespace WSL\BaseBundle\Util\Helper;
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Security\Acl\Permission\MaskBuilder;
/*
* To change this template, choose Tools | Templates