Skip to content

Instantly share code, notes, and snippets.

View 0xPr0xy's full-sized avatar
🎯
Focusing

Peter IJlst 0xPr0xy

🎯
Focusing
View GitHub Profile
//
// Change the following piece of code
//
CGContextSaveGState(context);
CGContextClip(context);
if (_privateGradientBool == YES) {
@0xPr0xy
0xPr0xy / api.python
Last active August 29, 2015 14:04
api
from app import app, render_template, Response, jsonify
import json
@app.route('/')
def index():
return 'index'
@app.route('/single')
def getDoneQuiz():
json = {
@0xPr0xy
0xPr0xy / DefaultController.php
Created September 5, 2014 09:05
DefaultController.php
<?php
namespace BBG\PrelumBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use BBG\PrelumBundle\Controller\CanonicalMenuController;
@0xPr0xy
0xPr0xy / config
Created September 19, 2014 14:39
config
liip_imagine:
cache_prefix: uploads/cache
driver: imagick
data_loader: filesystem
data_root: %kernel.root_dir%/../web
formats : ['jpg', 'jpeg','png', 'gif', 'bmp']
filter_sets:
optim:
quality: 85
format: jpg
services:
bbg.canonical.menu.controller:
class: '%bbg.controller.canonical.menu.class%'
arguments: ["@templating"]
calls:
- [setContainer, ["@service_container"]]
bbgutrechtscienceparkwebsitebundle.news.menu.adaptor:
class: BBG\UtrechtScienceParkWebsiteBundle\Helper\Menu\NewsMenuAdaptor
arguments: ["@doctrine.orm.entity_manager"]
tags:
@0xPr0xy
0xPr0xy / CanonicalMenuController.php
Created October 10, 2014 15:14
CanonicalMenuController.php
<?php
namespace BBG\UtrechtScienceParkWebsiteBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
use Symfony\Component\HttpFoundation\Response;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
@0xPr0xy
0xPr0xy / foreach.php
Created October 14, 2014 11:45
foreach.php
$a = array ('zero','one','two', 'three');
foreach ($a as &$v) {
}
foreach ($a as $v) {
echo $v.PHP_EOL;
}
(lldb) po self.saveButton
<UIButton: 0x796dd8e0; frame = (962 25; 42 42); hidden = YES; opaque = NO; layer = <CALayer: 0x796dda00>>
(lldb) po self.cancelButton
<UIButton: 0x796e0490; frame = (13 25; 42 42); hidden = YES; opaque = NO; layer = <CALayer: 0x796e05b0>>
(lldb) po self.cameraButton
<UIButton: 0x796dabb0; frame = (910 25; 42 42); opaque = NO; layer = <CALayer: 0x796dacd0>>
(lldb) po self.planningButton
@0xPr0xy
0xPr0xy / service
Created May 13, 2015 14:07
service
/**
* @param ContainerInterface $container The Container
* @param Request $request The Request
* @param RenderContext $context The Render context
*
* @return void|RedirectResponse
*/
public function service(ContainerInterface $container, Request $request, RenderContext $context)
{
$security = $container->get('security.context');
@0xPr0xy
0xPr0xy / SearchconfigInterface
Created May 28, 2015 14:06
SearchconfigInterface
<?php
namespace Kunstmaan\SearchBundle\Configuration;
/**
* Interface for a SearchConfiguration
*/
interface SearchConfigurationInterface
{
/**