Skip to content

Instantly share code, notes, and snippets.

View 0xPr0xy's full-sized avatar
🎯
Focusing

Peter IJlst 0xPr0xy

🎯
Focusing
View GitHub Profile
@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;
}
@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;
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 / 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
@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 / 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 / torrent_cli.py
Created April 25, 2014 09:04
torrent cli
#!/usr/bin/env python
from BeautifulSoup import BeautifulSoup
import click
import requests
@click.group()
def cli():
pass
@click.command()
@0xPr0xy
0xPr0xy / android-gdx-3d.java
Created April 2, 2014 15:42
android gdx 3d
package com.example.game.game;
import android.util.Log;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.FPSLogger;
import com.badlogic.gdx.graphics.OrthographicCamera;
//
// Change the following piece of code
//
CGContextSaveGState(context);
CGContextClip(context);
if (_privateGradientBool == YES) {
@0xPr0xy
0xPr0xy / surveillance
Last active December 25, 2015 10:29
shodan surveillance cam search and monitoring html generation.
#!/usr/bin/python
from __future__ import with_statement
import time
from shodan import WebAPI
import re,socket
import sys
import gevent
from gevent import socket
from gevent.pool import Pool
from gevent import monkey