Skip to content

Instantly share code, notes, and snippets.


Daniel Gustaw gustawdaniel

Block or report user

Report or block gustawdaniel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gustawdaniel / php7.conf
Created Dec 24, 2016
Compilation PHP 7.0.14 on BunsenLabs Hydrogen 2016-07-10
View php7.conf
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
SetHandler application/x-httpd-php
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to the files
# only in specific virtual host or directory
Require all denied
#!/usr/bin/env perl
use warnings;
use strict;
use HTML::TagParser;
my $url = '';
my @tags = ("h1 h2 h3 h4 li p","pre");
print "| text | code | title \n";
View clear.php
// definicje funkcji
// funkcja przyjmuje ścieżkę i czas w sekundach dla którego
// chemy usunąć pliki stworzone przed tym czasem
function clear($path,$time)
// listujemy wszystki pliki z danej lokaci
View zadanie2.php
function divide($divider, $dividend) {
if ($divider == 0){
throw new InvalidArgumentException("Divide by zero error");
if ($divider < 0){
throw new OutOfRangeException ("Divide is lover then zero");
View app.php
// config
$data = [
'email' => '',
'url' => '',
'ip' => ''
gustawdaniel /
Created May 19, 2017
Presentation of sending multiple files in POST

Firstly install httpie

sudo apt-get install httpie

Next in firs console run server

php -S

In second consoel run sender

View import.php
$host = 'localhost';
$user = 'root';
$pass = '';
$database = 'ingrid';
$file = 'ABBREV.csv';
$db = new PDO("mysql:dbname=".$database.";host=".$host, $user, $pass);
gustawdaniel / index.html
Created Mar 3, 2018
Dynamic CSS modification
View index.html
<style class="style"></style>
let style = `
body {
You can’t perform that action at this time.