This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once dirname(__FILE__).'/lib/class.blade.php'; | |
Blade::extend(function($value) { | |
$value = preg_replace('/(\s*)@wphead(\s*)/', '$1<?php wp_head() ?>$2', $value); | |
$value = preg_replace('/(\s*)@wpposts(\s*)/', '$1<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>$2', $value); | |
$value = preg_replace('/(\s*)@wpquery(\s*\(.*\))/', '$1<?php $q = new WP_Query$2; if ( $q->have_posts() ) : while ( $q->have_posts() ) : $q->the_post(); ?> ', $value); | |
$value = preg_replace('/(\s*)@wpempty(\s*)/', '$1<?php endwhile; ?><?php else: ?>$2', $value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#namespace Laravel; | |
# Use: Blade::compile_all( $from_dir, $to_dir ); | |
# visit: http://araujo.cc | |
# original class from http://cutlasswp.com | |
class Blade { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install ruby and gem | |
sudo apt-get install ruby gem | |
# install sass / scss | |
sudo gem install sass | |
# compile sass scripts | |
sass --watch scss/style.sass:css/style.css | |
# or compile scss scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install NodeJS + npm | |
sudo apt-get install nodejs | |
# symbolic link for node | |
sudo ln -s /usr/bin/nodejs /usr/bin/node | |
# install gulp | |
sudo npm install --global gulp gulp-utils | |
# install nice plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download installer | |
composer global require "laravel/installer=~1.1" | |
#setting up path | |
export PATH="~/.composer/vendor/bin:$PATH" | |
# change dir where to install | |
cd /var/www/html/ | |
# download and installing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# system installation | |
sudo npm install -g bower | |
# laravel installation | |
bower init | |
# configure to laravel | |
# create .bowerrc file | |
# write: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add this to your composer.json : | |
"laravelcollective/html": "~5.0" | |
# then update composer: | |
composer update | |
# then add providers in config/app.php | |
'Collective\Html\HtmlServiceProvider', | |
# and finally add two aliases in the same file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bower install --save PolymerElements/iron-elements | |
bower install --save PolymerElements/paper-elements | |
bower install --save PolymerElements/gold-elements | |
bower install --save PolymerElements/neon-elements | |
bower install --save PolymerElements/platinum-elements | |
bower install --save GoogleWebComponents/google-web-components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"repositories": [ | |
{ | |
"type": "composer", | |
"url": "http://wpackagist.org" | |
} | |
], | |
"require": { | |
"php": ">=5.4", | |
"johnpbloch/wordpress": "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From: https://github.com/czepol/geany-coffeescript-config/issues/2 | |
# Save it in ~/.config/geany/filedefs/filetypes.Coffeescript.conf | |
# Add at Tools -> Config files -> filetypes_extensions.conf | |
# Coffeescript=*.coffee;*.coffeescript;*.cs; | |
[settings] | |
lexer_filetype=Javascript | |
tag_parser=Javascript |
OlderNewer