Skip to content

Instantly share code, notes, and snippets.

View RKAN's full-sized avatar

Serkan Camur RKAN

  • Bitberry GmbH
  • Vienna
View GitHub Profile
<?php
//
// this gist takes most of the code from https://gist.github.com/3176917 but adds in form uploading which is just an @ symbol
// this also explores different options for the form data
//
// curl_post_upload.php
// You can modify this script to make PHP use a webpage like a person sitting
// at a computer would use a webpage.
//
// tags: #php #curl #form #upload
@RKAN
RKAN / awesome-php.md
Created July 19, 2013 16:05 — forked from ziadoz/awesome-php.md
# Awesome PHP A list of amazingly awesome PHP libraries, resources and shiny things.

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Composer Related

@RKAN
RKAN / .php
Created July 19, 2013 16:09
//gets the path to your root directory of your site
<?php
$path = $_SERVER['DOCUMENT_ROOT']; //gets the path to your root directory of your site
//now all links instead of being:
// (images/index.php) and have it be different across all pages, use this:
include_once ($path . '/layout/footer.php'); //and it is now universal across all pages
//found at: http://css-tricks.com/php-include-from-root/
?>
// if (!window.L) { window.L = function () { console.log(arguments);} } // optional EZ quick logging for debugging
/**
* A modified (improved?) version of the jQuery plugin design pattern
* See http://docs.jquery.com/Plugins/Authoring (near the bottom) for details.
*
* ADVANTAGES OF EITHER FRAMEWORK:
* - Encapsulates additional plugin action methods without polluting the jQuery.fn namespace
* - Ensures ability to use '$' even in compat modes
*
@RKAN
RKAN / gist:6040380
Created July 19, 2013 16:12 — forked from davist11/gist:2702312
/* * 'Highly configurable' mutable plugin boilerplate * Author: @markdalgleish * Further changes, comments: @addyosmani * Licensed under the MIT license */
/*
* 'Highly configurable' mutable plugin boilerplate
* Author: @markdalgleish
* Further changes, comments: @addyosmani
* Licensed under the MIT license
*/
// Note that with this pattern, as per Alex Sexton's, the plugin logic
// hasn't been nested in a jQuery plugin. Instead, we just use
// jQuery for its instantiation.
@RKAN
RKAN / jQueryPluginPatterns.js
Created July 19, 2013 16:13 — forked from addyosmani/jQueryPluginPatterns.js
A (very) WIP collection of optimized/recommended jQuery plugin patterns
/*
A (very) WIP collection of optimized/recommended jQuery plugin patterns
from @addyosmani, @cowboy, @ajpiano and others.
Disclaimer:
-----------------------
Whilst the end-goal of this gist is to provide a list of recommended patterns, this
is still very much a work-in-progress. I am not advocating the use of anything here
until we've had sufficient time to tweak and weed out what the most useful patterns