Skip to content

Instantly share code, notes, and snippets.

View albingeorge's full-sized avatar
🏠
Working from home

Albin George albingeorge

🏠
Working from home
  • IKEA
  • Amsterdam, Netherlands
View GitHub Profile
@albingeorge
albingeorge / WP_Plugin.php
Created June 12, 2014 05:07
Wordpress Plugin initialisation
<?php
/**
* @package Hello_Dolly
* @version 1.6
*/
/*
Plugin Name: Hello Dolly
Plugin URI: http://wordpress.org/plugins/hello-dolly/
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
Author: Matt Mullenweg
@albingeorge
albingeorge / 0_reuse_code.js
Created June 12, 2014 03:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@albingeorge
albingeorge / st3_preferences
Created June 10, 2014 07:40
Sublime Text 3 - User Preferences
{
"color_scheme": "Packages/User/Mac Classic (SL).tmTheme",
"font_face": "consolas",
"font_size": 14,
"ignored_packages":
[
"Vintage",
"SublimeLinter-phplint"
],
"show_full_path": true,
@albingeorge
albingeorge / magento_custom_page
Created May 13, 2014 06:44
Create a custom page for magento
1. Declare a module:
app/etc/local.xml:
<!-- add this: -->
<modules>
<Mage_Sampleorder>
<codePool>local</codePool>
<active>true</active>
</Mage_Sampleorder>
</modules>
<!-- before: -->
@albingeorge
albingeorge / gist:7243289
Created October 31, 2013 01:53
JavaScript function to set css property to an element #cross-browser
<script type="text/javascript">
function getTransformProperty(element) {
// Note that in some versions of IE9 it is critical that
// msTransform appear in this list before MozTransform
var properties = [
'transform',
'WebkitTransform',
'msTransform',
'MozTransform',
'OTransform'