Skip to content

Instantly share code, notes, and snippets.

Roman Ožana OzzyCzech

Block or report user

Report or block OzzyCzech

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
@OzzyCzech
OzzyCzech / .bash_profile
Last active Nov 2, 2018
Install NGINX, PHP-FPM (5.5.6), Mongo and MySql
View .bash_profile
#############################################################################
# current prompt
#############################################################################
# \d – Current date
# \t – Current time
# \h – Host name
# \# – Command number
# \u – User name
# \W – Current working directory (ie: Desktop/)
# \w – Current working directory, full path (ie: /Users/Admin/Desktop)
@OzzyCzech
OzzyCzech / gallery.php
Last active Aug 1, 2018
Wordpress responsive photo gallery with Twitter Boostrap 4
View gallery.php
@OzzyCzech
OzzyCzech / AjaxComment.php
Last active Feb 26, 2018
Wordpress comment AJAX send
View AjaxComment.php
<?php
namespace zdrojak\comments;
/**
* Odeslani komentaru pomoci Ajaxu
*
* @author Roman Ozana <ozana@omdesign.cz>
*/
class AjaxComnment {
@OzzyCzech
OzzyCzech / Presenter.php
Created Oct 2, 2011
Nativní Gettext translator v Nette
View Presenter.php
<?php
namespace Base;
use Nette\Environment;
abstract class Presenter extends \Nette\Application\UI\Presenter
{
/** @persitent */
public $lang;
@OzzyCzech
OzzyCzech / wordpress_ant.xml
Created Jan 25, 2011
Wordpress Apache ANT script
View wordpress_ant.xml
<?xml version="1.0" encoding="UTF-8"?>
<project basedir=".">
<property name="mysql" value="c:\Program Files\wamp\bin\mysql\mysql5.5.8\bin\" description="path to Mysql"/>
<property name="yuicompressor" value="c:\Program Files\yuicompressor-2.4.2\build\yuicompressor-2.4.2.jar" description="Path to yuicompressor-2.4.2.jar"/>
<property name="database" value="wp" description="Local database name"/>
<property name="url.production" value="http://www.blogs.com/wp" description="Production URL" />
<property name="url.local" value="http://localhost/blog" description="Local url" />
@OzzyCzech
OzzyCzech / apple.opml
Last active Jan 17, 2017
OPML list of Google blogs
View apple.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Apple</title>
</head>
<body>
<outline text="Apple" title="Apple">
<outline type="rss" text="MacRumors: Mac News and Rumors - Front Page" title="MacRumors: Mac News and Rumors - Front Page" xmlUrl="http://www.macrumors.com/macrumors.xml" htmlUrl="http://www.macrumors.com"/>
<outline type="rss" text="Cult of Mac" title="Cult of Mac" xmlUrl="http://feeds.feedburner.com/cultofmac/bFow" htmlUrl="http://www.cultofmac.com"/>
@OzzyCzech
OzzyCzech / index.html
Last active Jul 25, 2016
Pure CSS / HTML timeline
View index.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet/less" type="text/css" href="timeline.less"/>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/less.js/1.4.1/less.min.js"></script>
<script type="text/javascript">
less = {
env: "development", // or "production"
@OzzyCzech
OzzyCzech / t-mobile.md
Last active Jun 13, 2016
Únik osobních dat T-mobile
View t-mobile.md

Českému T-mobile uniklo 1,5 milionu osobních dat jejich zákazníků, tento únik se může týkat také Vašich osobních dat.

https://www.t-mobile.cz/podpora/kontaktujte-nas

Dobrý den,

jsem velmi znepokojen únikem osobních dat 1,5 milionů zákazníků
T-mobile a toto pochybení považuji za dostatečný důvod k ukončení smlouvy.
View convert.php
<?php
$data = json_decode(file_get_contents(__DIR__ . '/currency.json'));
$code = var_export((array)$data, true);
// add gettext function call
$code = preg_replace("/'name' => '(.+)'/", "'name' => __('$1')", $code);
$code = preg_replace("/'name_plural' => '(.+)'/", "'name' => __('$1')", $code);
// save PHP code
$code = "<?php\n return " . preg_replace('/stdClass::__set_state/', '(object)', $code) . ';';
file_put_contents(__DIR__ . '/currencies.locale.php', $code);
@OzzyCzech
OzzyCzech / speed.php
Created Dec 7, 2012
Page download speed measurement
View speed.php
<?php error_reporting(E_ALL | E_STRICT);
function format_bytes($size) {
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
for ($i = 0; $size >= 1024 && $i < 4; $i++) $size /= 1024;
return round($size, 2).$units[$i];
}
// Initialize cURL with given url
$url = isset($argv[1]) ? $argv[1] : 'http://www.google.com';
You can’t perform that action at this time.