Skip to content

Instantly share code, notes, and snippets.

View jonfalcon's full-sized avatar

Jon Falcon jonfalcon

  • Davao City, Philippines
View GitHub Profile
@jonfalcon
jonfalcon / wordpress-plugin-snippets.php
Created February 5, 2013 15:24
PHP: Wordpress Plugin Snippet
<?php
/**
* Plugin Name: Plugin
* Description: Description
* Author: Jon Falcon
* Version: 1.0
*/
// Copyright (C) 2013 Jon Falcon
// This program is free software: you can redistribute it and/or modify
@jonfalcon
jonfalcon / less-rounded-corner-mixins.less
Created February 5, 2013 15:30
CSS: rounder corners - less mixins
// Border Radius
.border-radius(@_, @radius){
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.border-radius(all, @radius) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
@jonfalcon
jonfalcon / gradient-text-shadow-buttons.less
Created February 5, 2013 15:35
CSS: Linear Gradient and Text Shadow for Buttons - less mixins
.linear-gradient( @from, @to ) {
background-color: @to;
background-image: -webkit-gradient(linear, left top, left bottom, from(@from), to(@to)); /* Safari 4+, Chrome */
background-image: -webkit-linear-gradient(top, @from, @to); /* Chrome 10+, Safari 5.1+, iOS 5+ */
background-image: -moz-linear-gradient(top, @from, @to); /* Firefox 3.6-15 */
background-image: -o-linear-gradient(top, @from, @to); /* Opera 11.10-12.00 */
background-image: linear-gradient(to bottom, @from, @to); /* Firefox 16+, IE10, Opera 12.50+ */
}
.linear-gradient( @from, @to: 0 ) when( @to = 0 ) {
@jonfalcon
jonfalcon / object-keys-polyfill.js
Created February 5, 2013 15:54
Javascript: Object keys polyfill
/**
* Polyfill for Object.keys
*
* @see: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/keys
*/
if (!Object.keys) {
Object.keys = (function () {
var hasOwnProperty = Object.prototype.hasOwnProperty,
hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),
dontEnums = [