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
@jaywilliams
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
<?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);
*
@thsutton
thsutton / normalise-path.php
Created Jan 10, 2011
Normalise paths in PHP
View normalise-path.php
<?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
@Marak
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) {
@RadekDvorak
RadekDvorak / Lock.php
Created Jul 19, 2011
Hack na FileJournal v Nette
View Lock.php
<?php
/**
* Exclusive lock in memcache
*
* @author Radek Dvořák <radek.dvorak@profimedia.cz>
*/
class Lock
{
/**
@dnaber-de
dnaber-de / editor_plugin.js
Created Jan 22, 2012
Wordpress TinyMCE Popup-Dialog. German Tutorial on http://dnaber.de/p1477
View editor_plugin.js
// js/editor_plugin.js
/**
* an example tinyMCE Plugin
*/
tinymce.create(
'tinymce.plugins.myPlugin',
{
/**
* @param tinymce.Editor editor
* @param string url
@simonbingham
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">
<head>
<meta charset="utf-8">
<title>HTML5 Local Storage Example</title>
<!-- include Bootstrap CSS for layout -->
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet">
@sepehr
sepehr / get_daterange_timestamps.php
Created Aug 27, 2013
PHP: Get corresponding timestamp boundaries of a daterange
View get_daterange_timestamps.php
<?php
/**
* Generates timestamp bounderies for the passed date range name.
*
* @param string $range Date range name.
*
* @return array
*/
function get_daterange_timestamps($range)
View backup-homebrew.sh
#!/bin/bash
echo '#!/bin/bash'
echo ''
echo 'failed_items=""'
echo 'function install_package() {'
echo 'echo EXECUTING: brew install $1 $2'
echo 'brew install $1 $2'
echo '[ $? -ne 0 ] && $failed_items="$failed_items $1" # package failed to install.'
echo '}'
@DenisIzmaylov
DenisIzmaylov / INSTALLATION.md
Last active Oct 9, 2018
OS X 10.11 El Capitan: fresh install with Node.js (io.js) Developer Environment
View INSTALLATION.md

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.

Content

You can’t perform that action at this time.