Skip to content

Instantly share code, notes, and snippets.

Hi there...

Roman Ožana OzzyCzech

Hi there...
View GitHub Profile
RadekDvorak / Lock.php
Created Jul 19, 2011
Hack na FileJournal v Nette
View Lock.php
* Exclusive lock in memcache
* @author Radek Dvořák <>
class Lock
addyosmani /
Last active Oct 25, 2017
Webpack Performance Presets

"We need Webpack presets" and "Webpack and its plugins are too hard to configure correctly" have been the number one cause of developer pain shared with me from large sites adopting Progressive Web Apps and optimising their load performance.

If I was building a Webpack preset pack for performance, I might use the following:

  • Ensure you're using a production build of your framework: new webpack.DefinePlugin({ 'process.env': env })
  • Minify your JS: webpack.optimize.UglifyJsPlugin
  • Compress your resources (GZip): compression-webpack-plugin
  • Split your vendor chunks: CommonsChunkPlugin
simonbingham / gist:3994802
Created Nov 1, 2012
JavaScript: Using HTML5 local storage and jQuery to persist form data
View gist:3994802
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>HTML5 Local Storage Example</title>
<!-- include Bootstrap CSS for layout -->
<link href="//" rel="stylesheet">
jaywilliams / array_to_object.php
Created Dec 16, 2009
Convert a multi-dimensional array into a stdClass object. Pass by reference.
View array_to_object.php
* Convert a multi-dimensional array into a stdClass object.
* Example:
* $values = array('hello'=>'world');
* // Convert the array to an object
* array_to_object($values);
sepehr / get_daterange_timestamps.php
Created Aug 27, 2013
PHP: Get corresponding timestamp boundaries of a daterange
View get_daterange_timestamps.php
* Generates timestamp bounderies for the passed date range name.
* @param string $range Date range name.
* @return array
function get_daterange_timestamps($range)
dnaber-de / editor_plugin.js
Created Jan 22, 2012
Wordpress TinyMCE Popup-Dialog. German Tutorial on
View editor_plugin.js
// js/editor_plugin.js
* an example tinyMCE Plugin
* @param tinymce.Editor editor
* @param string url
Marak / base64.js
Created Feb 8, 2011
An extremely simple implementation of base64 encoding / decoding using node.js Buffers
View base64.js
* base64.js: An extremely simple implementation of base64 encoding / decoding using node.js Buffers
* (C) 2010, Nodejitsu Inc.
var base64 = exports;
base64.encode = function (unencoded) {
thsutton / normalise-path.php
Created Jan 10, 2011
Normalise paths in PHP
View normalise-path.php
* Normalise a file path string so that it can be checked safely.
* Attempt to avoid invalid encoding bugs by transcoding the path. Then
* remove any unnecessary path components including '.', '..' and ''.
* @param $path string
* The path to normalise.
* @param $encoding string
kareman / trash.swift
Last active Apr 14, 2020 — forked from beccadax/trash.swift
Swift 3 script for sending files and folders to the trash, using the SwiftShell framework from .
View trash.swift
#!/usr/bin/env swiftshell
* Released under the MIT License (MIT),
import SwiftShell
import Dispatch
import Cocoa
DenisIzmaylov /
Last active Feb 26, 2021
OS X 10.11 El Capitan: fresh install with Node.js (io.js) Developer Environment

OS X 10.11 (El Capitan) / Node.js and io.js Developer Environment

Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.