Skip to content

Instantly share code, notes, and snippets.

View Zemistr's full-sized avatar
🦄

Martin Zeman Zemistr

🦄
View GitHub Profile
<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Kontrolní seznam časosběru</title>
<style>
/* Prusa-inspired and modern color variables */
:root {
--prusa-red: #E30613;
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bin &lt;-&gt; Dec</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
</head>
<body>
<main class="container">
Thingiverse images browser is showing kinda small fixtures... Let's fix it! :)
1) install Tampermonkey
2) add new script
3) paste content from `x-script.js` bellow
4) ...
5) profit
@Zemistr
Zemistr / ssh-mysql-tunnel-test.php
Created November 15, 2017 11:57 — forked from petenelson/ssh-mysql-tunnel-test.php
WordPress: MySQL PDO command via SSH tunnel
<?php
/**
* Plugin Name: SSH Remote Test
*/
add_action( 'admin_init', 'ssh_remote_test', 1 );
function ssh_remote_test() {
# Autodetect text files
* text=auto
# Force the following filetypes to have unix eols, so Windows does not break them
*.* text eol=lf
# (binary is a macro for -text -diff)
*.7z binary
*.eot binary
*.eps binary
@Zemistr
Zemistr / config.yml
Created September 29, 2016 13:58 — forked from K-Phoen/config.yml
Storing Symfony2 sessions in memcached
imports:
# ....
- { resource: services/session.yml }
framework:
# ....
session:
handler_id: session.handler.memcached
<?php
$changeParameters = [
"vyrobce" => "Canon",
"garance_tisku" => "5000 stran",
"kompatibilita" => "Canon XYZ"
];
$input = "Vysoce kvalitní toner určený pro laserové tiskárny[ [vyrobce]][ s garancí tisku [garance_tisku] při 5% pokrytí][ a kompatibilní s [kompatibilita]].";
/*
-> typ zapisu vztupního textu:
@Zemistr
Zemistr / TweetTester.php
Created November 14, 2015 21:28
A unit testing framework in a tweet.
<?php
function test($m,$p){echo"\033[".($p?"32m✔":"31m✘")." It $m\033[0m\n";!$p&&register_shutdown_function(function(){die(1);});}
@Zemistr
Zemistr / date_with_microseconds.php
Last active December 2, 2015 20:06
Date with microseconds
<?php
echo date('Y-m-d H:i:s') . strstr(microtime(true), '.');
@Zemistr
Zemistr / is_serialized.php
Last active September 13, 2015 13:55 — forked from bueltge/is_serialized.php
PHP is_serialized() function.
<?php
/**
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*/
/**