Skip to content

Instantly share code, notes, and snippets.

View piotr-zuralski's full-sized avatar
💭
I may be slow to respond.

Piotr Żuralski piotr-zuralski

💭
I may be slow to respond.
View GitHub Profile
<?php
setlocale(LC_ALL, 'pl_PL.utf8');
date_default_timezone_set('Europe/Warsaw');
header_remove();
/*
$date = new DateTime();
$dateModified = new DateTime();
$dateModified->setTime(0, 0, 0);
@piotr-zuralski
piotr-zuralski / resume.json
Last active November 23, 2023 19:24
resume.json
{
"$schema": "https://github.com/jsonresume/resume-schema/raw/v1.0.0/schema.json",
"meta": {
"theme": "flat",
"canonical": "https://gist.github.com/piotr-zuralski/757f25c60197178bb5f9688bf0603276/raw/resume.json",
"canonical_html": "https://registry.jsonresume.org/piotr-zuralski"
},
"basics": {
"email": "piotr@zuralski.net",
"label": "Senior Engineer",
@piotr-zuralski
piotr-zuralski / a-base.sh
Last active November 1, 2021 22:49
curl_https.php
wget "https://gist.github.com/piotr-zuralski/c4e63a2e1d74efc9ccc4e81b4e7232e3/raw/curl_https-no-ssl_verifyhost.php" -O curl_https-no-ssl_verifyhost.php
wget "https://gist.github.com/piotr-zuralski/c4e63a2e1d74efc9ccc4e81b4e7232e3/raw/curl_https-no-ssl_verifypeer-no_ssl_verifyhost.php" -O curl_https-no-ssl_verifypeer-no_ssl_verifyhost.php
wget "https://gist.github.com/piotr-zuralski/c4e63a2e1d74efc9ccc4e81b4e7232e3/raw/curl_https-no-ssl_verifypeer.php" -O curl_https-no-ssl_verifypeer.php
wget "https://gist.github.com/piotr-zuralski/c4e63a2e1d74efc9ccc4e81b4e7232e3/raw/curl_https-ssl_verifypeer-ssl_verifyhost.php" -O curl_https-ssl_verifypeer-ssl_verifyhost.php
wget "https://gist.github.com/piotr-zuralski/c4e63a2e1d74efc9ccc4e81b4e7232e3/raw/curl_https.php" -O curl_https.php
wget "https://gist.github.com/piotr-zuralski/c4e63a2e1d74efc9ccc4e81b4e7232e3/raw/file_get_contents-https.php" -O file_get_contents-https.php
wget "https://gist.github.com/piotr-zuralski/c4e63a2e1d74efc9ccc4e81b4e7232e3/raw/openssl-verify.p
@piotr-zuralski
piotr-zuralski / cli-clipboard-pbpaste-pbcopy.sh
Created April 8, 2021 17:56
cli operations on clipboard (copy, paste)
# brew install pbcopy pbpaste
# OR
# sudo apt install xclip xsel
# alias pbcopy='xsel --clipboard --input'
# alias pbpaste='xsel --clipboard --output'
# copy content of file to clipboard
pbcopy < file.txt
@piotr-zuralski
piotr-zuralski / add-datatable-to-page-dynamic.js
Last active March 18, 2021 14:02
Add/Loads DataTable to page - dynamicly
function __loadScript(url, integrity, callback) {
let script = document.createElement("script");
script.crossOrigin = "anonymous"
script.src = url
if (typeof integrity === "string") {
script.integrity = integrity
}
if (typeof callback === "function") {
script.onload = callback
}
@piotr-zuralski
piotr-zuralski / datetime-with-microtime.php
Created October 24, 2020 20:40
PHP DateTime with mictotime
<?php
declare(strict_types=1);
$t = explode(' ', microtime());
$dateTime = DateTime::createFromFormat('U.u',
$t[1] . substr($t[0], 1, 7)
);
$dateTime->setTimeZone(
new DateTimeZone(
date_default_timezone_get() ?: 'UTC'
@piotr-zuralski
piotr-zuralski / keybase.md
Last active September 12, 2019 11:55
keybase.md

Keybase proof

I hereby claim:

  • I am piotr-zuralski on github.
  • I am piotr_zuralski (https://keybase.io/piotr_zuralski) on keybase.
  • I have a public key ASDdn9TBXXb5XnEQ_igByV7bMQ9BMbomL3diBra_wa1Qtwo

To claim this, I am signing this object: