Skip to content

Instantly share code, notes, and snippets.

Jamie York ziadoz

Block or report user

Report or block ziadoz

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
@ziadoz
ziadoz / example.js
Created Feb 23, 2012 — forked from anonymous/example.js
JQuery Resize Events
View example.js
// See: http://ejohn.org/blog/learning-from-twitter/
(function($) {
$(document).ready(function() {
var resizeCallable = function() {
switch (true)
{
case (window.innerWidth <= 768):
// Do some exciting device size specific magic here.
break;
}
@ziadoz
ziadoz / meta.php
Created Feb 29, 2012 — forked from funkatron/foo.php
PHP 5.4 Meta Programming?
View meta.php
<?php
// See: https://gist.github.com/1942528
trait Call_Dynamic_Methods
{
public function __call($name, $arguments)
{
if (isset($this->{$name}) && $this->{$name} instanceof Closure) {
$this->{$name} = $this->{$name}->bindTo($this, $this);
return call_user_func_array($this->{$name}, $arguments);
}
@ziadoz
ziadoz / FooController.php
Created Sep 5, 2012 — forked from igorw/FooController.php
Silex convention-based controllers
View FooController.php
<?php
// src/Foobar/Controller/FooController.php
namespace Foobar\Controller;
class FooController
{
public function helloAction($request)
{
@ziadoz
ziadoz / highlighting.js
Last active Jun 28, 2018 — forked from jlong/uri.js
URI Parsing with Javascript/jQuery
View highlighting.js
(function($) {
$(document).ready(function() {
// Highlight Navigation
var url = $.parseUrl(document.location);
$('a').each(function() {
var link = $.parseUrl(this.href);
if (link.pathname !== '' && link.pathname === url.pathname) {
$(this).siblings().removeClass('active');
$(this).addClass('active');
}
You can’t perform that action at this time.