Skip to content

Instantly share code, notes, and snippets.

@acirtautas
acirtautas / square_detector.php
Created November 22, 2013 08:56
Square detector @ Facebook hacker cup 2014 qualification round
<?php
/**
* Facebook Hacker Cup 2014 Qualification Round
*
* Square detector
*
* @author Alfonsas Cirtautas
*/
// Read data
@acirtautas
acirtautas / crontab.txt
Created September 20, 2013 05:54
Raspberry PI kiosk scripts
# crontab -e
# Every work day at 8:30 am
30 8 * * 1,2,3,4,5 /home/pi/bin/tvon.sh
# Every work day at 18:30 pm
30 18 * * 1,2,3,4,5 /home/pi/bin/tvoff.sh
@acirtautas
acirtautas / app.php
Created February 8, 2013 07:09
Example of PHP return on include, nice feature.
<?php
$data = include __DIR__.'/data.php';
var_dump($data);
@acirtautas
acirtautas / balanced_smileys.php
Created February 7, 2013 07:15
Balanced Smileys @ Facebook hacker cup 2013 qualification round
<?php
/**
* Facebook Hacker Cup 2013 Qualification Round
*
* Balanced Smileys
*
* @author Alfonsas Cirtautas
*/
// Read data
@acirtautas
acirtautas / beautiful_strings.php
Created February 7, 2013 07:10
Beautiful strings @ Facebook hacker cup 2013 qualification round
<?php
/**
* Facebook Hacker Cup 2013 Qualification Round
*
* Beautiful strings
*
* @author Alfonsas Cirtautas
*/
// Read data
@acirtautas
acirtautas / arrays.php
Last active October 12, 2015 15:08
Strange php array reference behaviour. [FIXED]
<?php
$array = array('a', 'b', 'c');
foreach($array as $value) {
echo $value;
}
echo PHP_EOL;
foreach($array as &$value) {