Skip to content

Instantly share code, notes, and snippets.

View aambrozkiewicz's full-sized avatar

Aleksander Ambrozkiewicz aambrozkiewicz

View GitHub Profile
@aambrozkiewicz
aambrozkiewicz / Snake.cpp
Created May 29, 2015 19:05
C++ Snake game
#include <cstdlib>
#include <iostream>
#include <windows.h>
#include <time.h>
#include "Snejk.h"
using namespace std;
CSnejk::CSnejk()
<?php
// error_reporting(E_ALL);
require_once 'app/autoload.php';
require_once 'app/view.php';
$app = new App\App;
$app->get('/', function() {
@aambrozkiewicz
aambrozkiewicz / index.php
Created July 16, 2011 15:37
aleksandera.pl under hood
<?php
require_once 'app/app.php';
require_once 'app/view.php';
$app = new app;
try {
$app->get('/404', function() {
echo view::render('views/404.php');
@aambrozkiewicz
aambrozkiewicz / Punkty.cs
Created May 15, 2011 17:30
Mariuszowe punkty
using System;
namespace ConsoleApplication1
{
enum PointType
{
Point2D,
Point3D
}
@aambrozkiewicz
aambrozkiewicz / MY_Loader.php
Created April 21, 2011 18:54
CodeIgniter MY_Loader, displays used template before actual output in HTML comment
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Loader extends CI_Loader
{
function view($view, $vars = array(), $return = FALSE)
{
if ($return != TRUE)
echo "<!-- $view -->\n";
return ($return == TRUE ? "<!-- $view -->\n" : '') . $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_object_to_array($vars), '_ci_return' => $return));
}
@aambrozkiewicz
aambrozkiewicz / RGB.cpp
Created November 9, 2010 18:30
Arduino 3x1 byte wise RGB Serial driven LED
#include "RGB.h"
#include "WProgram.h"
RGB::RGB(uint8_t r, uint8_t g, uint8_t b)
{
Rpin = r;
Gpin = g;
Bpin = b;
}