Skip to content

Instantly share code, notes, and snippets.

View kbariotis's full-sized avatar
🌏

Kostas Bariotis kbariotis

🌏
View GitHub Profile

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

@kbariotis
kbariotis / ancient.js
Last active August 29, 2015 13:56
AncientJS is a minimal History API implementation.
var ancientJS = {
_bindUIEvents: function() {
$("body").on("click", "a", this._linkPushed);
$(window).on("popstate", this._onPopState);
},
init: function() {
this._bindUIEvents();
},
@kbariotis
kbariotis / build.xml
Created March 8, 2014 13:03
Phing build.xml boilerplate
<?xml version="1.0" encoding="UTF-8"?>
<project name="HelloWorld" default="welcome" basedir="." description="a demo project">
<property name="message" value="Hello World!"/>
<property name="buildDir" value="build"/>
<property name="srcDir" value="src"/>
<property name="ftp.host" value="ftp.example.com"/>
<property name="ftp.port" value="21"/>
<property name="ftp.username" value="user"/>
<property name="ftp.password" value="password"/>
<property name="ftp.dir" value="/public_html/"/>
@kbariotis
kbariotis / build.xml
Created March 17, 2014 18:54
Phing .xml for generating empty Magento Modules.
<?xml version="1.0" ?>
<project name="MagentoExt" basedir="." default="MagentoExt">
<!-- Properties -->
<property name="module.name" value="NAMESPACE" />
<property name="package.name" value="MODULENAME" />
<property name="package.scope" value="local" /><!-- local/community -->
<!-- Basic Folder and Files Structure Creation -->
<target name="MagentoExt" description="">
@kbariotis
kbariotis / grid.less
Last active August 29, 2015 14:00
Minimal Fluid Grid with LESSCSS
.grid_1 { width:7.5833333333333333333333333333333%; }
.grid_2 { width:15.166666666666666666666666666667%; }
.grid_3 { width:22.75%; }
.grid_4 { width:30.333333333333333333333333333333%; }
.grid_5 { width:37.916666666666666666666666666667%; }
.grid_6 { width:45.5%; }
.grid_7 { width:53.083333333333333333333333333333%; }
.grid_8 { width:60.666666666666666666666666666666%; }
.grid_9 { width:68.25%; }
.grid_10 { width:75.833333333333333333333333333333%; }
@kbariotis
kbariotis / install-mage.php
Created May 25, 2014 16:10
Magento installation from CLI
php install.php --license_agreement_accepted "yes" --locale "en_US" --timezone "Europe/Athens" --default_currency "EUR" --db_host "localhost" --db_name "magento19" --db_user "root" --session_save "db" --admin_frontname "admin" --url "http://localhost/magento1.9/" --use_rewrites "yes" --use_secure "yes" --secure_base_url "http://localhost/magento1.9/" --use_secure_admin "no" --admin_firstname "John" --admin_lastname "Smith" --admin_email "john.smith@widgets.com" --admin_username "admin" --admin_password "mag3nto"
@kbariotis
kbariotis / gist:8bce64d27aebc45fc738
Created July 17, 2014 18:18
Phing script to deploy clean Magento 1.9 setup (not finished)
<?xml version="1.0" encoding="UTF-8"?>
<project name="mageploy" default="prepare">
<target name="prepare">
<echo msg="Making directory ./tmp" />
<mkdir dir="./tmp" />
<if>
@kbariotis
kbariotis / error
Created October 3, 2014 20:17
Node . error
vagrant@precise32:~/app/wearetech.io$ node .
/home/vagrant/app/wearetech.io/back/models/user.model.js:68
default: __.partial(ModelMongo.defaultDate, config.users.emailConfirmati
^
TypeError: Cannot read property 'emailConfirmationExpires' of undefined
at Object.<anonymous> (/home/vagrant/app/wearetech.io/back/models/user.model
.js:68:63)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
@kbariotis
kbariotis / validation.php
Last active August 29, 2015 14:07
Respect/Validation Example
<?php
require_once __DIR__.'/your/vendor/autoload.php';
use Respect\Validation\Validator;
/**
* This would be your Model class
**/
class User {
@kbariotis
kbariotis / resources.md
Last active August 29, 2015 14:11
Magento Related Must Read Stuff for every beginner.